]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoEnhance CC Mode's fontification, etc., of unterminated strings.
Alan Mackenzie [Sun, 20 May 2018 13:28:14 +0000 (13:28 +0000)]
Enhance CC Mode's fontification, etc., of unterminated strings.

String delimiters, including escaped new lines, of correctly terminated
strings are left in font-lock-string-face.  All others get
font-lock-warning-face.  The latter get syntax-table text properties on the
opening string delim and the "terminating EOL".

Correct two miscellaneous bugs: the handling of text properties on Java Mode's
generic delimiters; the handling of c-just-done-before-change.

* lisp/progmodes/cc-defs.el (c-point): New position 'eoll "end of logical line".
(c-characterp): New macro.

* lisp/progmodes/cc-fonts.el (c-font-lock-invalid-string): Removed.
(c-basic-matchers-before): Use a simple matcher in place of the form around
c-font-lock-invalid-string.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Add
c-before-change-check-unbalanced-strings to the value for all modes except AWK
Mode.  Also add c-before-change-check-<>-operators to Java Mode, correcting an
error in that mode's handling of generic delimiters.
(c-before-font-lock-functions): Add c-after-change-re-mark-unbalanced-strings
to the value for all modes except AWK Mode.
(c-single-quotes-quote-strings, c-string-delims): New lang variables for
future enhancements.
(c-string-innards-re-alist): New lang variable.

* lisp/progmodes/cc-mode.el (c-just-done-before-change): Do not set this
variable when a change is the alteration of text properties.
(c-basic-common-init): Set parse-sexp-lookup-properties (and the XEmacs
equivalent) also for Pike Mode.
(c-neutralize-CPP-line): No longer neutralize unbalanced quotes here.
(c-unescaped-nls-in-string-p, c-multiline-string-start-is-being-detached)
(c-pps-to-string-delim, c-before-change-check-unbalanced-strings)
(c-after-change-re-mark-unbalanced-strings): New functions.
(c-after-change): Fix a bug with the handling of c-just-done-before-change.

6 years ago* etc/HELLO: More reasonable placement of 'charset' properties.
Eli Zaretskii [Sun, 20 May 2018 08:53:03 +0000 (11:53 +0300)]
* etc/HELLO: More reasonable placement of 'charset' properties.

6 years ago* admin/notes/unicode: HELLO is again UTF-8.
Paul Eggert [Sat, 19 May 2018 17:01:23 +0000 (10:01 -0700)]
* admin/notes/unicode: HELLO is again UTF-8.

6 years agoUse Enriched mode in etc/HELLO to keep charset information
Eli Zaretskii [Sat, 19 May 2018 15:17:38 +0000 (18:17 +0300)]
Use Enriched mode in etc/HELLO to keep charset information

This allows to encode HELLO in UTF-8, thus supporting the entire
repertory of Unicode, while still keeping the charset info where
that is important.  Suggested by Michael Welsh Duggan <mwd@md5i.com>.
* lisp/textmodes/enriched.el (enriched-translations): Add
translations for 'charset'.
(enriched-decode-charset, enriched-handle-charset-prop): New
functions.
* lisp/facemenu.el (facemenu-special-menu): Add sub-menu for
'charset' property.
(facemenu-set-charset): New function.
(facemenu-remove-special): Remove the 'charset' property as well.

* etc/NEWS: Announce the new feature of Enriched mode.
* etc/HELLO: Recode in UTF-8 and place under Enriched mode.

* doc/emacs/text.texi (Enriched Properties): Mention the support
for 'charset'.

6 years ago* src/alloc.c: Fix comment.
Paul Eggert [Fri, 18 May 2018 22:53:21 +0000 (15:53 -0700)]
* src/alloc.c: Fix comment.

6 years agoPort to GCC 8 -fsanitize=undefined
Paul Eggert [Fri, 18 May 2018 22:45:42 +0000 (15:45 -0700)]
Port to GCC 8 -fsanitize=undefined

In GCC 8, gcc -fsanitize=undefined flags the undefined behavior
that Emacs relies on in its XPNTR and XSYMBOL low-level functions.
Disable undefined sanitization in these functions.  Although this
disabling doesn’t suffice if DEFINE_KEY_OPS_AS_MACROS is true, it
works for -fsanitize=undefined -DINLINING=0, which is good enough.
* src/alloc.c (macro_PNTR_ADD): New macro.
(PNTR_ADD): New function and macro.
The function disables -fsanitize=undefined.
(macro_XPNTR): Use it.
* src/conf_post.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.
* src/lisp.h (XSYMBOL): Disable -fsanitize=undefined.

6 years ago(gnus-blocked-images): Clarify privacy implications
Lars Ingebrigtsen [Fri, 18 May 2018 14:05:02 +0000 (16:05 +0200)]
(gnus-blocked-images): Clarify privacy implications

* lisp/gnus/gnus-art.el (gnus-blocked-images): Clarify the privacy
implication of altering the value of this variable.

6 years agoFix decoding of directories when "~" includes non-ASCII chars
Eli Zaretskii [Fri, 18 May 2018 13:34:19 +0000 (16:34 +0300)]
Fix decoding of directories when "~" includes non-ASCII chars

* src/fileio.c (Fexpand_file_name): Don't build multibyte strings
from unibyte non-ASCII strings when NAME and DEFAULT_DIRECTORY
have different multibyteness, as this adds bytes to the byte
sequence, and in some situations, e.g., when the home directory
includes non-ASCII characters, can fail file APIs.  (Bug#30755)

* lisp/startup.el (normal-top-level): Make sure default-directory
is set to a multibyte string when decoded on MS-Windows.

6 years agoFix bugs in `auth-source-netrc-parse-one'.
Filipp Gunbin [Tue, 15 May 2018 00:02:49 +0000 (03:02 +0300)]
Fix bugs in `auth-source-netrc-parse-one'.

* lisp/auth-source.el (auth-source-netrc-parse-one): Ensure that match
  data is not overwritten in `auth-source-netrc-parse-next-interesting'.
  Ensure that blanks are skipped before and after going over comments
  and eols.
* test/lisp/auth-source-tests.el (auth-source-test-netrc-parse-one): New test.

6 years agoFix creation of Secret Service items in auth-source
Michael Albinus [Wed, 16 May 2018 09:22:51 +0000 (11:22 +0200)]
Fix creation of Secret Service items in auth-source

* lisp/auth-source.el (auth-source-secrets-create): Use ´apply'.
(auth-source-secrets-saver): Handle `auth-source-save-behavior'
equal t.

* lisp/net/secrets.el (secrets-get-items): Do not call
`secrets-open-session' here ...
(top): ... but here.

* test/lisp/auth-source-tests.el
(auth-source-test-secrets-create-secret): Bind
`auth-source-save-behavior' to t.  Cleanup.

* test/lisp/net/secrets-tests.el (secrets-test00-availability):
After loading secets.el, a session is already opened.
(secrets-test02-collections, secrets-test03-items)
(secrets-test04-search): Open a new session.

6 years agoGive '$' punctuation syntax in make-mode (Bug#24477)
Dima Kogan [Tue, 20 Sep 2016 05:55:34 +0000 (22:55 -0700)]
Give '$' punctuation syntax in make-mode (Bug#24477)

* lisp/progmodes/make-mode.el (makefile-mode-syntax-table): Set syntax
of '$' to punctuation.

6 years agoSimplify eshell arg processing with (pop (nthcdr ...))
Noam Postavsky [Sat, 12 May 2018 19:09:18 +0000 (15:09 -0400)]
Simplify eshell arg processing with (pop (nthcdr ...))

* lisp/eshell/esh-opt.el (eshell--set-option)
(eshell--process-args): Use (pop (nthcdr ...)) instead of writing it
out by hand.

6 years agoesh-opt.el: Add a :parse-leading-options-only argument (Bug#28323)
Jay Kamat [Tue, 8 May 2018 19:36:36 +0000 (12:36 -0700)]
esh-opt.el: Add a :parse-leading-options-only argument (Bug#28323)

* lisp/eshell/esh-opt.el (eshell-eval-using-options): Add a new
:parse-leading-options-only argument which ignores dash/switch
arguments after the first positional argument.
(eshell--process-args): Abort processing of arguments if we see one
positional argument and :parse-leading-options-only is set.
* lisp/eshell/em-tramp.el (eshell/sudo): Use
:parse-leading-options-only, to avoid parsing subcommand switches as
switches of sudo itself.
* test/lisp/eshell/esh-opt-tests.el: Add tests for new and old behavior.

6 years agoesh-opt.el: Fix improper parsing of first argument (Bug#28323)
Jay Kamat [Tue, 8 May 2018 19:04:00 +0000 (12:04 -0700)]
esh-opt.el: Fix improper parsing of first argument (Bug#28323)

Examples of broken behavior:

    sudo -u root whoami
    Outputs: -u
    ls -I '*.txt' /dev/null
    Errors with: *.txt: No such file or directory

* lisp/eshell/esh-opt.el (eshell--process-args): Refactor usage of
args to eshell--args, as we rely on modifications from
eshell--process-option and vice versa.  These modifications were not
being propogated in the (if (= ai 0)) case, since popping the first
element of a list doesn't destructively modify the underlying list
object.

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 15 May 2018 16:09:48 +0000 (09:09 -0700)]
Merge from origin/emacs-26

c2ef847 (origin/emacs-26) Clarify the mode-line indicators in CC Mode

6 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 15 May 2018 16:09:48 +0000 (09:09 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

934bb47 Fix filesystem littering by Flymake's legacy backend

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 15 May 2018 16:09:48 +0000 (09:09 -0700)]
Merge from origin/emacs-26

b98cf9c ; Fix a typo in the Emacs manual
700fcd7 * doc/emacs/help.texi: Fix paren typo.
c9c0e40 More minor changes in shell-related nodes of Emacs manual
e6bf19c Fix inaccuracies in "Shell Ring" node of Emacs manual
087681b8 Improve documentation of kmacro commands and variables.
be2e8cb * doc/man/emacs.1.in: Document --fg-daemon and --bg-daemon.
1d9e66a Don't check non-X frames for z order (Bug#31373)
7dc028e Check NSWindow is actually a frame

Conflicts:
src/nsfns.m

6 years agoFix Bug#29575
Michael Albinus [Tue, 15 May 2018 12:48:11 +0000 (14:48 +0200)]
Fix Bug#29575

* lisp/net/secrets.el (secrets-create-item): The new item does not
need a unique label.
(secrets-item-path, secrets-get-secret, secrets-get-attributes)
(secrets-get-attribute, secrets-delete-item): ITEM can also be an
object path.  (Bug#29575)

* test/lisp/net/secrets-tests.el (secrets-test03-items):
Test also creation of two items with same label.  Test
`secrets-get-secret', `secrets-get-attribute' and
`secrets-get-attributes' with object path.
(secrets-test04-search): Harden test.

6 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Tue, 15 May 2018 09:07:46 +0000 (11:07 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

6 years agoFix Bug#31068
Michael Albinus [Tue, 15 May 2018 09:06:18 +0000 (11:06 +0200)]
Fix Bug#31068

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Unregister unless `tramp-archive-enabled'.  (Bug#31068)

6 years agoRun python test if the python executable is found
Tino Calancha [Tue, 15 May 2018 00:03:02 +0000 (09:03 +0900)]
Run python test if the python executable is found

* test/lisp/progmodes/python-tests.el (python-tests--bug31398):
Skip test when executable python is no found.

6 years agorun-python: Make the buffer running python current
Tino Calancha [Mon, 14 May 2018 16:30:11 +0000 (01:30 +0900)]
run-python: Make the buffer running python current

* lisp/progmodes/python.el (run-python, python-shell-make-comint):
Make the buffer running the inferior python process the current buffer
(Bug#31398).
* test/lisp/progmodes/python-tests.el (python-tests--bug31398):
Add test.

6 years agoClarify the mode-line indicators in CC Mode
Eli Zaretskii [Mon, 14 May 2018 16:28:06 +0000 (19:28 +0300)]
Clarify the mode-line indicators in CC Mode

* doc/emacs/programs.texi (Electric C): Explain '*' and '/' in the
CC Mode mode-line.  (Bug31445)

6 years agoMinor refactoring in shell-command
Basil L. Contovounesios [Mon, 14 May 2018 16:23:35 +0000 (01:23 +0900)]
Minor refactoring in shell-command

* lisp/simple.el (shell-command): Use call-process-shell-command,
start-process-shell-command, and file-attribute-size. (bug#30280).

6 years agoFix a broken test
Basil L. Contovounesios [Mon, 14 May 2018 16:22:04 +0000 (01:22 +0900)]
Fix a broken test

* lisp/simple.el (shell-command): Use call-process-shell-command,
start-process-shell-command, and file-attribute-size. (bug#30280)

6 years ago* lisp/net/ange-ftp.el (ange-ftp-allow-child-lookup):
Michael Albinus [Mon, 14 May 2018 15:14:17 +0000 (17:14 +0200)]
* lisp/net/ange-ftp.el (ange-ftp-allow-child-lookup):

Do not use obsolete ´dired-local-variables-file'.

6 years agoFix Bug#30663
Michael Albinus [Mon, 14 May 2018 15:12:16 +0000 (17:12 +0200)]
Fix Bug#30663

* lisp/dired.el (dired-revert):
Call `hack-dir-local-variables-non-file-buffer'.  (Bug#30663)

6 years agoImprove `dired-buffer-stale-p' for remote files
Michael Albinus [Mon, 14 May 2018 15:09:18 +0000 (17:09 +0200)]
Improve `dired-buffer-stale-p' for remote files

* lisp/dired.el (dired-buffer-stale-p): Check for ´file-remote-p'
only if `auto-revert-remote-files' is non-nil.

6 years ago; Update etc/NEWS
Michael Albinus [Mon, 14 May 2018 15:06:58 +0000 (17:06 +0200)]
; Update etc/NEWS

6 years agoRemove obsolete objects from dired-x.el
Michael Albinus [Mon, 14 May 2018 15:06:33 +0000 (17:06 +0200)]
Remove obsolete objects from dired-x.el

* doc/misc/dired-x.texi (Local Variables): Remove node.

* lisp/dired-x.el (dired-enable-local-variables)
(default-directory-alist, dired-default-directory-alist)
(dired-default-directory, dired-local-variables-file)
(dired-hack-local-variables, dired-omit-here-always):
Remove obsolete variables, constants and functions.

6 years agoFix filesystem littering by Flymake's legacy backend
João Távora [Fri, 11 May 2018 22:28:40 +0000 (23:28 +0100)]
Fix filesystem littering by Flymake's legacy backend

The Flymake legacy "proc" backend, which is active by default will try
to syntax-check foo.c/foo.cpp and many other types of files, but on
failing to find a suitable Makefile target, will fail.  There's
nothing wrong with that except that it used to leave behind the
foo_flymake.c and foo_flymake.cpp auxiliary files behind, littering
the filesystem.

* lisp/progmodes/flymake-proc.el (flymake-proc-legacy-flymake):
Call init-function inside of the unwind-protect.

6 years ago; Fix a typo in the Emacs manual
Eli Zaretskii [Sat, 12 May 2018 09:09:05 +0000 (12:09 +0300)]
; Fix a typo in the Emacs manual

* doc/emacs/fixit.texi (Transpose): Fix a typo.  Reported by
Takesi Ayanokoji <ayanokoji.takesi@gmail.com>.

6 years ago* doc/emacs/help.texi: Fix paren typo.
Paul Eggert [Fri, 11 May 2018 23:09:14 +0000 (16:09 -0700)]
* doc/emacs/help.texi: Fix paren typo.

6 years agoFix filesystem littering by Flymake's legacy backend
João Távora [Fri, 11 May 2018 22:28:40 +0000 (23:28 +0100)]
Fix filesystem littering by Flymake's legacy backend

The Flymake legacy "proc" backend, which is active by default will try
to syntax-check foo.c/foo.cpp and many other types of files, but on
failing to find a suitable Makefile target, will fail.  There's
nothing wrong with that except that it used to leave behind the
foo_flymake.c and foo_flymake.cpp auxiliary files behind, littering
the filesystem.

* lisp/progmodes/flymake-proc.el (flymake-proc-legacy-flymake):
Call init-function inside of the unwind-protect.

6 years agoTramp updates
Michael Albinus [Fri, 11 May 2018 16:38:46 +0000 (18:38 +0200)]
Tramp updates

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
Parse multibyte symlinks correctly.

* test/lisp/net/tramp/tramp-tests.el (tramp--test-utf8):
Improve backward compatibility.

6 years agoMore minor changes in shell-related nodes of Emacs manual
Eli Zaretskii [Fri, 11 May 2018 09:39:52 +0000 (12:39 +0300)]
More minor changes in shell-related nodes of Emacs manual

* doc/emacs/misc.texi (Interactive Shell): Clarify how the window
that displays "*shell*" is selected.
(Shell Prompts): Fix a typo.  Reported by Jorge
<jorge+list@disroot.org> in emacs-manual-bugs.

6 years agoFix inaccuracies in "Shell Ring" node of Emacs manual
Eli Zaretskii [Fri, 11 May 2018 09:32:31 +0000 (12:32 +0300)]
Fix inaccuracies in "Shell Ring" node of Emacs manual

* doc/emacs/misc.texi (Shell Ring): Don't mention 'M-s' and don't
insist on Shell history commands being "jsut like" similar
commands that operate on minibuffer history.  Reported by Jorge
<jorge+list@disroot.org> in emacs-manual-bugs.

6 years agoImprove documentation of kmacro commands and variables.
Eli Zaretskii [Fri, 11 May 2018 09:11:14 +0000 (12:11 +0300)]
Improve documentation of kmacro commands and variables.

* lisp/kmacro.el (kmacro-start-macro-or-insert-counter)
(kmacro-counter, kmacro-set-format, kmacro-set-counter)
(kmacro-add-counter, kmacro-counter-format)
(kmacro-insert-counter): Clarify and improve the doc strings.
(Bug#31243)

6 years ago* doc/man/emacs.1.in: Document --fg-daemon and --bg-daemon.
Noam Postavsky [Fri, 11 May 2018 02:47:04 +0000 (22:47 -0400)]
* doc/man/emacs.1.in: Document --fg-daemon and --bg-daemon.

6 years agoRewrite scroll-other-window-down in C (bug#30207)
Basil L. Contovounesios [Tue, 1 May 2018 12:48:30 +0000 (13:48 +0100)]
Rewrite scroll-other-window-down in C (bug#30207)

* lisp/window.el (scroll-other-window-down):
Move to src/window.c as Fscroll_other_window_down.
* src/window.c (scroll_command): Generalise for arbitrary windows.
(Fscroll_up, Fscroll_down): Use scroll_command with selected_window.
(Fscroll_other_window, Fscroll_other_window_down):
Rewrite in terms of scroll_command.
(syms_of_window): Add Sscroll_other_window_down.

6 years agoSimplify "other window" bob/eob motion commands
Basil L. Contovounesios [Tue, 1 May 2018 15:05:52 +0000 (16:05 +0100)]
Simplify "other window" bob/eob motion commands

* lisp/window.el (beginning-of-buffer-other-window)
(end-of-buffer-other-window):
Simplify via with-selected-window. (bug#30207)

6 years agoImprove documentation for "other window" scrolling
Basil L. Contovounesios [Thu, 3 May 2018 12:52:20 +0000 (13:52 +0100)]
Improve documentation for "other window" scrolling

* doc/emacs/windows.texi (Other Window):
* doc/lispref/windows.texi (Textual Scrolling):
Document scroll-other-window-down.
* doc/lispref/minibuf.texi (Minibuffer Misc):
Cross-reference minibuffer-scroll-window with Textual Scrolling.
* src/window.c (Fother_window_for_scrolling):
Clarify how "other window" is determined in docstring.
(Fscroll_other_window): Simplify docstring, pointing to that of
Fother_window_for_scrolling. (bug#30207)

6 years agoLimit "other window" scrolling to current terminal
Basil L. Contovounesios [Mon, 30 Apr 2018 17:02:15 +0000 (18:02 +0100)]
Limit "other window" scrolling to current terminal

* src/window.c (Fother_window_for_scrolling): Limit next-window
search to visible frames on the current terminal. (bug#30207)

6 years agoDon't check non-X frames for z order (Bug#31373)
Noam Postavsky [Sun, 6 May 2018 14:07:25 +0000 (10:07 -0400)]
Don't check non-X frames for z order (Bug#31373)

* src/xfns.c (x_frame_list_z_order): Only use frames with
`output_method' set to `output_x_window'.

6 years agoCheck NSWindow is actually a frame
Alan Third [Sun, 6 May 2018 20:49:31 +0000 (21:49 +0100)]
Check NSWindow is actually a frame

* src/nsfns.m (Fns_frame_list_z_order): Check NSWindow is an instance
of EmacsView before treating it as one.

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 7 May 2018 14:50:49 +0000 (07:50 -0700)]
Merge from origin/emacs-26

1d732d6 (origin/emacs-26) Fix gud-statement for pdb
91a68b5 ; * msdos/INSTALL: Add info about GCC versions.
7ddcc9a Document 'custom-group'
58f9e15 A minor addition to etc/DEBUG
4590414 Avoid errors in ispell.el when Enchant returns empty extra chars
d0d75f9 Make 'ispell-initialize-spellchecker-hook' work again
b90ce66 Handle selected_window change in prepare_menu_bars (Bug#31312)
79ad0b3 ; * INSTALL: Fix Emacs version number.  (Bug#31358)
91de88b Fix report-emacs-bug via mailclient on MS-Windows
f4b5ff2 Port collation tests to glibc 2.27

6 years agoFix gud-statement for pdb
Xu Chunyang [Sun, 6 May 2018 19:46:04 +0000 (22:46 +0300)]
Fix gud-statement for pdb

* lisp/progmodes/gud.el (pdb): Fix the gud-print implementation.
(Bug#31363)

6 years agoFix cairo scrolling for side-by-side windows
Ari Roponen [Sun, 6 May 2018 12:29:28 +0000 (15:29 +0300)]
Fix cairo scrolling for side-by-side windows

* src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for
side-by-side split windows.  (Bug#31288)

6 years agoDon't remove highlight of misspelled word on pdict save
Eli Zaretskii [Sun, 6 May 2018 18:20:31 +0000 (21:20 +0300)]
Don't remove highlight of misspelled word on pdict save

* lisp/textmodes/ispell.el (ispell-pdict-save): Don't restart
flyspell-mode, as bug#11963, which this was supposed to fix, is
fixed better by ispell-command-loop, when the user types 'i' or
'a'.  Restarting Flyspell mode when the personal dictionary is
saved caused bug#31372 as side effect.
(ispell-command-loop): Test 'flyspell-mode', not whether
flyspell-unhighlight-at is fboundp, to determine whether Flyspell
mode is turned on in the current buffer.
(flyspell-unhighlight-at): Add declare-function form for it.

6 years agoFix Bug#31272
Michael Albinus [Sun, 6 May 2018 10:39:36 +0000 (12:39 +0200)]
Fix Bug#31272

* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-sh-handle-insert-directory): Use "--show-control-chars".
(tramp-convert-file-attributes): Decode multibyte strings,
produced by "stat".  (Bug#31272)

* test/lisp/net/tramp-tests.el (tramp--test-utf8): Extend test.

6 years agoInclude narrowing indication in describe-mode
Michael Hendricks [Sat, 5 May 2018 09:41:43 +0000 (12:41 +0300)]
Include narrowing indication in describe-mode

* lisp/help.el (describe-mode): Include "Narrow", if narrowing is
active.  (Bug#31139)

Copyright-paperwork-exempt: yes

6 years agoFix some problems in the Cairo build
Ari Roponen [Fri, 27 Apr 2018 12:13:12 +0000 (15:13 +0300)]
Fix some problems in the Cairo build

* src/xterm.c (x_begin_cr_clip): Create image surface.
(x_update_end) [USE_CAIRO]: Remove GTK3-specific code.
(x_scroll_run) [USE_CAIRO]: Implement scrolling.
* src/image.c (lookup_rgb_color) [USE_CAIRO]: Support Cairo.
(jpeg_load_body) [USE_CAIRO]: Support Cairo.  Use USE_CAIRO
instead of CAIRO for #ifdef's.
(imagemagick_load_image) [USE_CAIRO]: Support Cairo.
(Bug#31288)

6 years agoAvoid infloops in font_open_entity
Eli Zaretskii [Sat, 5 May 2018 08:52:29 +0000 (11:52 +0300)]
Avoid infloops in font_open_entity

* src/font.c (font_open_entity): Fail after 15 iterations through
the loop that looks for a font whose average_width and height are
both positive.  This avoids infinite loops for fonts that, e.g.,
report average_width of zero for any possible size we try.
(Bug#31316)

6 years agoFix encoding of characters when using GB18030 fonts
Eli Zaretskii [Sat, 5 May 2018 08:45:37 +0000 (11:45 +0300)]
Fix encoding of characters when using GB18030 fonts

* lisp/international/fontset.el (font-encoding-alist): Fix the
GB18030 entry to encode characters correctly when passing them to
the xfont back-end.  (Bug#31315)  See also
http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00754.html.

6 years ago; * msdos/INSTALL: Add info about GCC versions.
Eli Zaretskii [Fri, 4 May 2018 15:12:32 +0000 (18:12 +0300)]
; * msdos/INSTALL: Add info about GCC versions.

6 years agoDocument 'custom-group'
Eli Zaretskii [Fri, 4 May 2018 15:00:02 +0000 (18:00 +0300)]
Document 'custom-group'

* doc/lispref/customize.texi (Group Definitions): Document the
'custom-group' property.

6 years agoA minor addition to etc/DEBUG
Eli Zaretskii [Fri, 4 May 2018 14:43:29 +0000 (17:43 +0300)]
A minor addition to etc/DEBUG

* etc/DEBUG: Add a note for macOS users who get error messages
when trying to run GDB.

6 years agoAvoid errors in ispell.el when Enchant returns empty extra chars
Daniel Pittman [Fri, 4 May 2018 14:37:10 +0000 (17:37 +0300)]
Avoid errors in ispell.el when Enchant returns empty extra chars

* lisp/textmodes/ispell.el (ispell--get-extra-word-characters):
Handle the case of empty extra characters returned by the
Enchant '-lsmod' command. (Bug#31344)

Copyright-paperwork-exempt: yes

6 years agoMake 'ispell-initialize-spellchecker-hook' work again
Eli Zaretskii [Fri, 4 May 2018 14:25:33 +0000 (17:25 +0300)]
Make 'ispell-initialize-spellchecker-hook' work again

* lisp/textmodes/ispell.el (ispell-base-dicts-override-alist):
Defvar it to allow dynamic binding.  (Bug#31341)

6 years ago* make-dist: Don't fail if building --without-makeinfo.
Noam Postavsky [Mon, 30 Apr 2018 19:49:04 +0000 (15:49 -0400)]
* make-dist: Don't fail if building --without-makeinfo.

6 years agoHandle selected_window change in prepare_menu_bars (Bug#31312)
Noam Postavsky [Fri, 4 May 2018 00:54:25 +0000 (20:54 -0400)]
Handle selected_window change in prepare_menu_bars (Bug#31312)

* src/xdisp.c (redisplay_internal): Check selected_window after
calling prepare_menu_bars, since it can call lisp hooks.

6 years agoFix windows snapshot building
Phillip Lord [Thu, 3 May 2018 20:40:34 +0000 (21:40 +0100)]
Fix windows snapshot building

* admin/nt/dist-build/build-zips.sh: Fix broken if statement

6 years ago* admin/nt/dist-build/build-zips.sh: Support building of branches
Phillip Lord [Sun, 8 Apr 2018 12:40:48 +0000 (13:40 +0100)]
* admin/nt/dist-build/build-zips.sh: Support building of branches

6 years ago; * INSTALL: Fix Emacs version number. (Bug#31358)
Eli Zaretskii [Thu, 3 May 2018 18:19:07 +0000 (21:19 +0300)]
; * INSTALL: Fix Emacs version number.  (Bug#31358)

6 years agoMore porting to GCC 8 of --enable-gcc-warnings
Paul Eggert [Thu, 3 May 2018 18:15:28 +0000 (11:15 -0700)]
More porting to GCC 8 of --enable-gcc-warnings

* lwlib/lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu):
* lwlib/lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance):
* lwlib/lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]:
No longer const.
* src/emacs-module.c: Ignore -Wcast-function-type.

6 years agoFix report-emacs-bug via mailclient on MS-Windows
Eli Zaretskii [Thu, 3 May 2018 18:04:17 +0000 (21:04 +0300)]
Fix report-emacs-bug via mailclient on MS-Windows

* lisp/net/browse-url.el (browse-url-default-windows-browser):
On MS-Windows, call url-unhex-string only for file:// URLs.
(Bug#31351)

6 years agoFix next-page for dired (Bug#31061)
Marco Wahl [Fri, 27 Apr 2018 11:50:08 +0000 (13:50 +0200)]
Fix next-page for dired (Bug#31061)

* lisp/textmodes/page-ext.el (next-page): Don't go back any pages if
COUNT is 0.  For negative COUNT, end with point just after the last
delimiter.

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
6 years agoMinor simple.el simplifications (Bug#31211)
Basil L. Contovounesios [Sun, 29 Apr 2018 23:58:32 +0000 (00:58 +0100)]
Minor simple.el simplifications (Bug#31211)

* lisp/simple.el (kill-append, push-mark, pop-mark):
Simplify conditionals and surrounding code.

6 years agoFix off-by-one history pruning (bug#31211)
Basil L. Contovounesios [Sun, 29 Apr 2018 14:37:45 +0000 (15:37 +0100)]
Fix off-by-one history pruning (bug#31211)

* lisp/subr.el (add-to-history): Clarify docstring.
Protect against negative history-length and unnecessary variable
modification, as per read_minibuf.

* lisp/ido.el (ido-record-command):
* lisp/international/mule-cmds.el (deactivate-input-method):
(set-language-environment-input-method):
* lisp/isearch.el (isearch-done):
* lisp/minibuffer.el (read-file-name-default):
* lisp/net/eww.el (eww-save-history):
* lisp/simple.el (edit-and-eval-command, repeat-complex-command):
(command-execute, kill-new, push-mark):
* src/callint.c (Fcall_interactively):
* src/minibuf.c (read_minibuf): Delegate to add-to-history.

* test/lisp/simple-tests.el (command-execute-prune-command-history):
* test/src/callint-tests.el
(call-interactively-prune-command-history): New tests.

6 years ago* lisp/textmodes/ispell.el (ispell-use-framepop-p): Doc fix.
Glenn Morris [Wed, 2 May 2018 19:39:30 +0000 (15:39 -0400)]
* lisp/textmodes/ispell.el (ispell-use-framepop-p): Doc fix.

6 years ago; * lisp/auth-source.el (auth-sources): Fix a comment.
Glenn Morris [Wed, 2 May 2018 19:29:53 +0000 (15:29 -0400)]
; * lisp/auth-source.el (auth-sources): Fix a comment.

6 years agoPort collation tests to glibc 2.27
Paul Eggert [Wed, 2 May 2018 18:14:07 +0000 (11:14 -0700)]
Port collation tests to glibc 2.27

* test/src/fns-tests.el (fns-tests-collate-strings)
(fns-tests-collate-sort): Don’t make unportable assumptions
about how en_US.UTF-8 collation works.  These assumptions
are not true on Fedora 28, which ships with glibc 2.27.

6 years agoAdapt Tramp for auth-source
Michael Albinus [Wed, 2 May 2018 16:12:48 +0000 (18:12 +0200)]
Adapt Tramp for auth-source

* lisp/net/tramp.el (tramp-read-passwd): auth-source could return
cascaded functions.

6 years agoFix some edge cases of tramp-smb
Michael Albinus [Wed, 2 May 2018 10:31:51 +0000 (12:31 +0200)]
Fix some edge cases of tramp-smb

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_REVISION_MISMATCH".
(tramp-smb-handle-delete-directory): Check, that the directory
has been removed indeed.
(tramp-smb-get-localname): Add further checks on filename syntax.

* lisp/net/tramp.el (tramp-localname-regexp): Do not allow linefeeds.

* test/lisp/net/tramp-tests.el (tramp-smb-get-localname): Declare.
(auth-source-save-behavior): Set it to nil.
(tramp-test01-file-name-syntax): Extend, checking for linefeeds.
(tramp-test03-file-name-host-rules, tramp--test-utf8): Refine tests.
(tramp-test03-file-name-method-rules): New test.
(tramp--test-ignore-add-name-to-file-error): New defmacro.
(tramp-test21-file-links): Use it.

6 years ago; Merge from origin/emacs-26
Glenn Morris [Tue, 1 May 2018 14:50:48 +0000 (07:50 -0700)]
; Merge from origin/emacs-26

The following commits were skipped:

65ac277 (origin/emacs-26) Port --enable-gcc-warnings to GCC 8
4b10800 Advise CFLAGS= operand, not in environment, when configuring

6 years agoMerge from origin/emacs-26
Glenn Morris [Tue, 1 May 2018 14:50:48 +0000 (07:50 -0700)]
Merge from origin/emacs-26

71be806 ; * etc/DEBUG: Minor clarification.
4403f89 Update the Emacs FAQ
40b3317 * etc/DEBUG: Minor copyedits.
850ff18 Clarify wording of NS drag n drop documentation
343d70b1 Improve kill-related documentation (bug#31209)
0b43224 * lisp/simple.el (region-extract-function): Don't hide the 'n...
d6e2c59 Fix pre- and post-command-hook errors in term.el
6cf83131e * doc/lispref/display.texi (Glyphless Chars): Fix grammar.
88d178c Fix macOS drag n drop event documentation

6 years ago`url-domain' doc clarification
Lars Ingebrigtsen [Tue, 1 May 2018 12:29:11 +0000 (14:29 +0200)]
`url-domain' doc clarification

* lisp/url/url-util.el (url-domain): Add an example to the doc
string.

6 years agoRewrite `url-domain' to avoid network traffic
Lars Ingebrigtsen [Tue, 1 May 2018 12:26:27 +0000 (14:26 +0200)]
Rewrite `url-domain' to avoid network traffic

* lisp/url/url-util.el (url-domain): Don't talk DNS to determine
the domain, because this is slow.

* test/lisp/url/url-util-tests.el (url-domain-tests): Add tests
for `url-domain'.

6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 1 May 2018 11:28:50 +0000 (07:28 -0400)]
; Auto-commit of loaddefs files.

6 years agoPort --enable-gcc-warnings to GCC 8
Paul Eggert [Tue, 1 May 2018 00:17:11 +0000 (17:17 -0700)]
Port --enable-gcc-warnings to GCC 8

Backport from master.
* lib-src/emacsclient.c (fail):
Do not dereference a null pointer.
* src/frame.c (delete_frame):
Add a decl with UNINIT to work around GCC bug 85563.
* src/menu.h (finish_menu_items):
Do not use attribute const.
* src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.

6 years agoAdvise CFLAGS= operand, not in environment, when configuring
Paul Eggert [Mon, 30 Apr 2018 17:13:40 +0000 (10:13 -0700)]
Advise CFLAGS= operand, not in environment, when configuring

Backport from master.

6 years ago* test/src/process-tests.el (make-process/mix-stderr): Skip on hydra.
Glenn Morris [Mon, 30 Apr 2018 16:51:17 +0000 (12:51 -0400)]
* test/src/process-tests.el (make-process/mix-stderr): Skip on hydra.

6 years ago* lisp/net/socks.el: Use lexical-binding and process properties
Stefan Monnier [Mon, 30 Apr 2018 02:25:09 +0000 (22:25 -0400)]
* lisp/net/socks.el: Use lexical-binding and process properties

Remove unneeded requires.  Better following commenting conventions.
(socks-connections): Remove (use process properties instead).
(socks-wait-for-state-change): Make it a function.
(open-network-stream): Use an advice when overriding.
(socks-send-command): Avoid string-make-unibyte.
(socks--open-network-stream): New function (extracted from
socks-open-network-stream).
(socks-open-network-stream): Rewrite using it.

6 years agoAdvise CFLAGS= operand, not in environment, when configuring
Paul Eggert [Sun, 29 Apr 2018 16:28:11 +0000 (09:28 -0700)]
Advise CFLAGS= operand, not in environment, when configuring

6 years ago; * etc/DEBUG: Minor clarification.
Eli Zaretskii [Sun, 29 Apr 2018 16:27:55 +0000 (19:27 +0300)]
; * etc/DEBUG: Minor clarification.

6 years agoReplace epg--gv-nreverse with (cl-callf nreverse ...)
Noam Postavsky [Sun, 29 Apr 2018 00:35:30 +0000 (20:35 -0400)]
Replace epg--gv-nreverse with (cl-callf nreverse ...)

* lisp/epg.el (epg--gv-nreverse): Remove.
(epg-list-keys): Replace it with (cl-callf nreverse ...).

6 years agoPort --enable-gcc-warnings to GCC 8
Paul Eggert [Sat, 28 Apr 2018 23:49:24 +0000 (16:49 -0700)]
Port --enable-gcc-warnings to GCC 8

* configure.ac: Do not use GCC 8’s new -Wcast-align flag.
* lib-src/ebrowse.c (xmalloc):
* lib-src/emacsclient.c (xmalloc, xstrdup):
* lib-src/etags.c (xmalloc):
* lib-src/make-docfile.c (xmalloc):
* lib-src/movemail.c (xmalloc):
* src/dispnew.c (new_glyph_pool):
* src/regex.c (xmalloc):
* src/term.c (tty_menu_create):
* src/tparam.h (tparam):
Use ATTRIBUTE_MALLOC.  Also see GCC bug 85562.
* lib-src/emacsclient.c (fail):
Do not dereference a null pointer.
* src/frame.c (delete_frame):
Add a decl with UNINIT to work around GCC bug 85563.
* src/menu.h (finish_menu_items):
Do not use attribute const.
* src/regex.c (analyze_first): Use FALLTHROUGH, not a comment.

6 years agoUpdate from Gnulib
Paul Eggert [Sat, 28 Apr 2018 23:49:23 +0000 (16:49 -0700)]
Update from Gnulib

This incorporates:
2018-04-27 manywarnings: port to GCC 8.0
* build-aux/config.sub, m4/manywarnings.m4: Copy from Gnulib.

6 years ago* lisp/vc/add-log.el (change-log-mode-syntax-table): New defvar
Juri Linkov [Sat, 28 Apr 2018 20:38:56 +0000 (23:38 +0300)]
* lisp/vc/add-log.el (change-log-mode-syntax-table): New defvar

that redefines syntax of quotes to "expression quote or prefix operator".
(Bug#31231)

6 years ago* lisp/subr.el (dotimes): Deprecate RESULT field. (Bug#16206)
Juri Linkov [Sat, 28 Apr 2018 20:20:33 +0000 (23:20 +0300)]
* lisp/subr.el (dotimes): Deprecate RESULT field.  (Bug#16206)

* doc/lispref/control.texi (Iteration):
* doc/misc/cl.texi (Iteration): Document deprecation of its use.
* doc/lispintro/emacs-lisp-intro.texi (dotimes):
* test/src/emacs-module-tests.el (multiply-string):
* test/lisp/filenotify-tests.el (file-notify-test07-many-events):
Place RESULT field after the form.

6 years agoUpdate the Emacs FAQ
Eli Zaretskii [Sat, 28 Apr 2018 12:03:17 +0000 (15:03 +0300)]
Update the Emacs FAQ

* doc/misc/efaq.texi (Latest version of Emacs): Update versions.
(New in Emacs 26): New node.

* admin/release-process: Mention the FAQ update as part of the
release.

6 years ago* etc/DEBUG: Minor copyedits.
Eli Zaretskii [Sat, 28 Apr 2018 11:28:24 +0000 (14:28 +0300)]
* etc/DEBUG: Minor copyedits.

6 years ago* src/fns.c (Fstring_distance): Minor code reformatting.
Eli Zaretskii [Sat, 28 Apr 2018 07:41:27 +0000 (10:41 +0300)]
* src/fns.c (Fstring_distance): Minor code reformatting.

6 years agoFix documentation and tests for 'string-distance'
Eli Zaretskii [Sat, 28 Apr 2018 07:27:53 +0000 (10:27 +0300)]
Fix documentation and tests for 'string-distance'

* src/fns.c (Fstring_distance): Doc fix.

* doc/lispref/strings.texi (Text Comparison): Document
'string-distance'.

* etc/NEWS: Fix wording and mark as documented in the manuals.

* test/src/fns-tests.el (test-string-distance): Move from
subr-tests.el and rename.

6 years agoNew function 'string-distance'
Chen Bin [Thu, 19 Apr 2018 14:38:29 +0000 (00:38 +1000)]
New function 'string-distance'

* src/fns.c (Fstring_distance): New primitive.
(syms_of_fns): Defsubr it.

* test/lisp/subr-tests.el (subr-tests--string-distance): New test.

* etc/NEWS: Mention 'string-distance'.

6 years ago; Copyedits in etc/NEWS
Michael Albinus [Fri, 27 Apr 2018 13:01:17 +0000 (15:01 +0200)]
; Copyedits in etc/NEWS

6 years agoManual update for Tramp
Michael Albinus [Fri, 27 Apr 2018 12:43:01 +0000 (14:43 +0200)]
Manual update for Tramp

* doc/misc/tramp.texi (Password handling): Explain, how passwords
are saved permanently.

* etc/NEWS: auth-source Secret Service backend supports :create.
Tramp saves validated passwords.

6 years ago* lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).
Noam Postavsky [Fri, 27 Apr 2018 11:27:59 +0000 (07:27 -0400)]
* lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).

6 years agoClarify wording of NS drag n drop documentation
Alan Third [Sun, 22 Apr 2018 10:06:42 +0000 (11:06 +0100)]
Clarify wording of NS drag n drop documentation

* doc/emacs/macos.texi (Mac / GNUstep Events): Clarify wording of
ns-drag-n-drop description.

6 years agoStrip most headers when forwarding messages
Lars Ingebrigtsen [Thu, 26 Apr 2018 17:45:53 +0000 (19:45 +0200)]
Strip most headers when forwarding messages

* lisp/gnus/message.el (message-forward-included-headers): Change
the default to exclude most messages.
(message-remove-ignored-headers): Make
message-forward-included-headers actually work -- it's a list of
regexps, not a list of strings.