commit 9d7f0e27e0592132c1b5b9c280192333eaf288b8 (HEAD, refs/remotes/origin/master) Merge: 4c048aaf06 04e5b28ff1 Author: Paul Eggert Date: Sat Dec 2 21:38:05 2017 -0800 Merge from origin/emacs-26 04e5b28ff1 Fix bug in i18n/l10n optimization 8227087194 Let autoload-compute-prefix be set file-locally (Bug#29471) 98ca7d5f26 Improve edit-kbd-macro prompting in case of remapped keys ... c02c1f6be7 Add tests on electric-indentation and Python multiline str... 946bb6d225 Disable electric indent for python strings (Bug#29305) 35f1ed10e4 ; ChangeLog.2: Fix bug reference. ac316634e4 Fix buffer overflow in fontname conversion (Bug#29523) bf9b972843 Fix byte compilation of files with leading directories ac144dc835 * lisp/files.el (make-backup-file-name-1): Fix scoping error. 1b351c8a47 Revert Tramp commit from 2017-11-20 77cf972592 Improve documentation of buffer-list commands and features 66ec92af00 Fix backing up remote files in local directories on MS-Win... 7e61e74da7 * doc/emacs/mule.texi (Output Coding): Clarify sendmail co... 1e25cd79ff Revert "Fix backing up remote files in local directories o... f52d79500b Fix a typo in ELisp manual bf26fc3656 * lisp/composite.el (find-composition): Fix a typo in the ... commit 4c048aaf06863057b9dd695639f70cc937b02755 Merge: f1204e1dda 34a21c3bf6 Author: Paul Eggert Date: Sat Dec 2 21:38:05 2017 -0800 ; Merge from origin/emacs-26 The following commit was skipped: 34a21c3bf6 ; Auto-commit of loaddefs files. commit f1204e1dda84a65d7906949247076c6ba4d4ba40 Merge: bc092fcaea 8c8b673288 Author: Paul Eggert Date: Sat Dec 2 21:38:05 2017 -0800 Merge from origin/emacs-26 8c8b673288 Fix backing up remote files in local directories on MS-Win... 8eb6870be6 Fix vertical cursor motion in pixel-scroll.el 625e84f156 Fix typos in doc strings of message.el 9292276a44 Fix a typo in the Emacs manual 42509c0649 Improve the documentation of 'table-insert-sequence' 93dc7ae4a4 Port better to QNX ad99550610 Make tramp-test42-auto-load more robust af0ce33d08 ; * lisp/composite.el (find-composition): Fix a typo in la... bdbcdbac43 Avoid assertions in find-composition commit 04e5b28ff1691345e023a944dc6a6a9e9573bd07 (refs/remotes/origin/emacs-26) Author: Paul Eggert Date: Sat Dec 2 21:31:24 2017 -0800 Fix bug in i18n/l10n optimization This fixes a off-by-one buffer overrun bug introduced in 2017-06-04T15:39:37Z!eggert@cs.ucla.edu. Problem uncovered by an experimental version of Emacs built with -fcheck-pointer-bounds and running on Intel MPX hardware. * src/editfns.c (styled_format): Avoid overrunning internal buffers. diff --git a/src/editfns.c b/src/editfns.c index f275f33fc5..f7c26b900a 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -4919,7 +4919,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) else if (discarded[bytepos] == 1) { position++; - if (translated == info[fieldn].start) + if (fieldn < nspec && translated == info[fieldn].start) { translated += info[fieldn].end - info[fieldn].start; fieldn++; @@ -4939,7 +4939,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) else if (discarded[bytepos] == 1) { position++; - if (translated == info[fieldn].start) + if (fieldn < nspec && translated == info[fieldn].start) { translated += info[fieldn].end - info[fieldn].start; fieldn++; commit 8227087194e0817b984ce3b15099f5eae4dc011c Author: Noam Postavsky Date: Mon Nov 27 07:26:10 2017 -0500 Let autoload-compute-prefix be set file-locally (Bug#29471) * lisp/emacs-lisp/autoload.el (autoload-compute-prefixes): Mark boolean values as safe. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 7299ae9d20..71fc51e27b 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -497,6 +497,7 @@ Return non-nil in the case where no autoloads were added at point." Standard prefixes won't be registered anyway. I.e. if a file \"foo.el\" defines variables or functions that use \"foo-\" as prefix, that will not be registered. But all other prefixes will be included.") +(put 'autoload-compute-prefixes 'safe #'booleanp) (defconst autoload-def-prefixes-max-entries 5 "Target length of the list of definition prefixes per file. commit 98ca7d5f26f5bdde44864c7f24dafb6725fca09f Author: Noam Postavsky Date: Sun Nov 26 19:16:16 2017 -0500 Improve edit-kbd-macro prompting in case of remapped keys (Bug#29399) * lisp/edmacro.el (edit-kbd-macro): Use substitute-command-keys to present the current bindings in the prompt. Check the the non-remapped binding of the entered key sequence as well. diff --git a/lisp/edmacro.el b/lisp/edmacro.el index b050f4d64c..dc840ef1f1 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -88,20 +88,26 @@ Default nil means to write characters above \\177 in octal notation." (defun edit-kbd-macro (keys &optional prefix finish-hook store-hook) "Edit a keyboard macro. At the prompt, type any key sequence which is bound to a keyboard macro. -Or, type `C-x e' or RET to edit the last keyboard macro, `C-h l' to edit -the last 300 keystrokes as a keyboard macro, or `\\[execute-extended-command]' to edit a macro by -its command name. +Or, type `\\[kmacro-end-and-call-macro]' or RET to edit the last +keyboard macro, `\\[view-lossage]' to edit the last 300 +keystrokes as a keyboard macro, or `\\[execute-extended-command]' +to edit a macro by its command name. With a prefix argument, format the macro in a more concise way." - (interactive "kKeyboard macro to edit (C-x e, M-x, C-h l, or keys): \nP") + (interactive + (list (read-key-sequence (substitute-command-keys "Keyboard macro to edit \ +\(\\[kmacro-end-and-call-macro], \\[execute-extended-command], \\[view-lossage],\ + or keys): ")) + current-prefix-arg)) (when keys (let ((cmd (if (arrayp keys) (key-binding keys) keys)) + (cmd-noremap (when (arrayp keys) (key-binding keys nil t))) (mac nil) (mac-counter nil) (mac-format nil) kmacro) (cond (store-hook (setq mac keys) (setq cmd nil)) - ((or (memq cmd '(call-last-kbd-macro kmacro-call-macro - kmacro-end-or-call-macro kmacro-end-and-call-macro)) + ((or (memq cmd '(call-last-kbd-macro kmacro-call-macro kmacro-end-or-call-macro kmacro-end-and-call-macro)) + (memq cmd-noremap '(call-last-kbd-macro kmacro-call-macro kmacro-end-or-call-macro kmacro-end-and-call-macro)) (member keys '("\r" [return]))) (or last-kbd-macro (y-or-n-p "No keyboard macro defined. Create one? ") @@ -109,13 +115,14 @@ With a prefix argument, format the macro in a more concise way." (setq mac (or last-kbd-macro "")) (setq keys nil) (setq cmd 'last-kbd-macro)) - ((eq cmd 'execute-extended-command) + ((memq 'execute-extended-command (list cmd cmd-noremap)) (setq cmd (read-command "Name of keyboard macro to edit: ")) (if (string-equal cmd "") (error "No command name given")) (setq keys nil) (setq mac (symbol-function cmd))) - ((memq cmd '(view-lossage electric-view-lossage)) + ((or (memq cmd '(view-lossage electric-view-lossage)) + (memq cmd-noremap '(view-lossage electric-view-lossage))) (setq mac (recent-keys)) (setq keys nil) (setq cmd 'last-kbd-macro)) commit c02c1f6be7befdaf4f3987148db18121e1081dae Author: Lele Gaifax Date: Wed Nov 15 10:10:19 2017 +0100 Add tests on electric-indentation and Python multiline strings (Bug#29305) * test/lisp/progmodes/python-tests.el (python-indent-electric-comma-inside-multiline-string, python-indent-electric-comma-after-multiline-string): New tests. diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index a59885637e..010eb67160 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -1109,6 +1109,37 @@ def fn(a, b, c=True): (should (eq (car (python-indent-context)) :inside-string)) (should (= (python-indent-calculate-indentation) 4)))) +(ert-deftest python-indent-electric-comma-inside-multiline-string () + "Test indentation ...." + (python-tests-with-temp-buffer + " +a = ( + '''\ +- foo, +- bar +''' +" + (python-tests-look-at "- bar") + (should (eq (car (python-indent-context)) :inside-string)) + (goto-char (line-end-position)) + (python-tests-self-insert ",") + (should (= (current-indentation) 0)))) + +(ert-deftest python-indent-electric-comma-after-multiline-string () + "Test indentation ...." + (python-tests-with-temp-buffer + " +a = ( + '''\ +- foo, +- bar''' +" + (python-tests-look-at "- bar'''") + (should (eq (car (python-indent-context)) :inside-string)) + (goto-char (line-end-position)) + (python-tests-self-insert ",") + (should (= (current-indentation) 0)))) + (ert-deftest python-indent-electric-colon-1 () "Test indentation case from Bug#18228." (python-tests-with-temp-buffer commit 946bb6d2250ce81fc68ec0bca4e1bb79815f4a59 Author: Noam Postavsky Date: Sun Nov 19 09:00:43 2017 -0500 Disable electric indent for python strings (Bug#29305) * lisp/progmodes/python.el (python-indent-post-self-insert-function): Do nothing when point or beginning of line is in string. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d4226e5ce7..9e09bfc594 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1257,7 +1257,11 @@ This function is intended to be added to `post-self-insert-hook.' If a line renders a paren alone, after adding a char before it, the line will be re-indented automatically if needed." (when (and electric-indent-mode - (eq (char-before) last-command-event)) + (eq (char-before) last-command-event) + (not (python-syntax-context 'string)) + (save-excursion + (beginning-of-line) + (not (python-syntax-context 'string (syntax-ppss))))) (cond ;; Electric indent inside parens ((and commit 35f1ed10e464c105758994050edec05506a5dfb3 Author: Noam Postavsky Date: Sun Nov 26 21:23:48 2017 -0500 ; ChangeLog.2: Fix bug reference. diff --git a/ChangeLog.2 b/ChangeLog.2 index c971397a13..bf85406b1f 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -32128,7 +32128,7 @@ eshell: Introduce new buffer syntax The new buffer syntax '#' is equivalent to '#'. Remove `eshell-buffer-shorthand', as it is no longer - needed (Bug#19319). + needed (Bug#19391). * lisp/eshell/esh-io.el (eshell-buffer-shorthand): Remove. (eshell-get-target): Remove shorthand-specific code. * lisp/eshell/esh-arg.el (eshell-parse-special-reference): Parse commit ac316634e4452bcf97ff8ebc5fbabf27337a16dd Author: Yuuki Harano Date: Fri Dec 1 19:31:16 2017 +0000 Fix buffer overflow in fontname conversion (Bug#29523) * src/nsterm.m (ns_xlfd_to_fontname): Fix sscanf format. Copyright-paperwork-exempt: yes diff --git a/src/nsterm.m b/src/nsterm.m index 59a42eed88..50e06c94d4 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -9152,9 +9152,9 @@ Convert an X font name (XLFD) to an NS font name. const char *ret; if (!strncmp (xlfd, "--", 2)) - sscanf (xlfd, "--%*[^-]-%[^-]179-", name); + sscanf (xlfd, "--%*[^-]-%179[^-]-", name); else - sscanf (xlfd, "-%*[^-]-%[^-]179-", name); + sscanf (xlfd, "-%*[^-]-%179[^-]-", name); /* stopgap for malformed XLFD input */ if (strlen (name) == 0) commit bf9b972843113dd1fb416f5bd7cb127eaf4927d0 Author: Eli Zaretskii Date: Sat Dec 2 13:29:39 2017 +0200 Fix byte compilation of files with leading directories * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Pass basename of target-file to make-temp-file, in case target-file includes a leading directory that might not exist under TMPDIR. See http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00680.html for the details. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e5a1ea782e..f69ac7f342 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1931,7 +1931,8 @@ The value is non-nil if there were no errors, nil if errors." ;; process is trying to load target-file (eg in a ;; parallel bootstrap), it does not risk getting a ;; half-finished file. (Bug#4196) - (tempfile (make-temp-file target-file)) + (tempfile + (make-temp-file (file-name-nondirectory target-file))) (default-modes (default-file-modes)) (temp-modes (logand default-modes #o600)) (desired-modes (logand default-modes #o666)) commit ac144dc835c2a759c96eee0b10c7b2196db3d17f Author: Michael Albinus Date: Sat Dec 2 12:27:27 2017 +0100 * lisp/files.el (make-backup-file-name-1): Fix scoping error. diff --git a/lisp/files.el b/lisp/files.el index 1bdb6d38ab..ef4c2ea818 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4673,15 +4673,15 @@ The function `find-backup-file-name' also uses this." (if (eq (aref file 2) ?/) "" "/") - (substring file 2)))))) - ;; Make the name unique by substituting directory - ;; separators. It may not really be worth bothering about - ;; doubling `!'s in the original name... - (expand-file-name - (subst-char-in-string - ?/ ?! - (replace-regexp-in-string "!" "!!" file)) - backup-directory))) + (substring file 2))))))) + ;; Make the name unique by substituting directory + ;; separators. It may not really be worth bothering about + ;; doubling `!'s in the original name... + (expand-file-name + (subst-char-in-string + ?/ ?! + (replace-regexp-in-string "!" "!!" file)) + backup-directory)) (expand-file-name (file-name-nondirectory file) (file-name-as-directory abs-backup-directory)))))) commit 1b351c8a479c571644cffec87a647257903188e0 Author: Michael Albinus Date: Sat Dec 2 12:09:57 2017 +0100 Revert Tramp commit from 2017-11-20 * lisp/net/tramp.el (tramp-drop-volume-letter) (tramp-handle-find-backup-file-name): Revert change from 2017-11-20. Emacs' `make-backup-file-name-1' handles this case now. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6b0b1da6eb..124da17348 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1858,8 +1858,7 @@ letter into the file name. This function removes it." (if (tramp-compat-file-name-quoted-p name) 'tramp-compat-file-name-quote 'identity) (let ((name (tramp-compat-file-name-unquote name))) - ;; A volume letter could occur also in encoded backup file names. - (if (string-match "\\(\\`[[:alpha:]]:/\\|/!drive_[[:alpha:]]\\)" name) + (if (string-match "\\`[a-zA-Z]:/" name) (replace-match "/" nil t name) name))))) @@ -3226,23 +3225,21 @@ User is always nil." (defun tramp-handle-find-backup-file-name (filename) "Like `find-backup-file-name' for Tramp files." (with-parsed-tramp-file-name filename nil - (mapcar - 'tramp-drop-volume-letter - (let ((backup-directory-alist - (if tramp-backup-directory-alist - (mapcar - (lambda (x) - (cons - (car x) - (if (and (stringp (cdr x)) - (file-name-absolute-p (cdr x)) - (not (tramp-tramp-file-p (cdr x)))) - (tramp-make-tramp-file-name - method user domain host port (cdr x) hop) - (cdr x)))) - tramp-backup-directory-alist) - backup-directory-alist))) - (tramp-run-real-handler 'find-backup-file-name (list filename)))))) + (let ((backup-directory-alist + (if tramp-backup-directory-alist + (mapcar + (lambda (x) + (cons + (car x) + (if (and (stringp (cdr x)) + (file-name-absolute-p (cdr x)) + (not (tramp-tramp-file-p (cdr x)))) + (tramp-make-tramp-file-name + method user domain host port (cdr x) hop) + (cdr x)))) + tramp-backup-directory-alist) + backup-directory-alist))) + (tramp-run-real-handler 'find-backup-file-name (list filename))))) (defun tramp-handle-insert-directory (filename switches &optional wildcard full-directory-p) commit 77cf972592ee1c86ca330a42d4009f99bed1a349 Author: Eli Zaretskii Date: Sat Dec 2 12:56:45 2017 +0200 Improve documentation of buffer-list commands and features * doc/emacs/buffers.texi (List Buffers): Add a cross-reference to "Several Buffers", to establish a relation between the two sections. (Buffer Menus): Expand on customizability of alternative buffer menu offered by bs.el. Mention IBuffer. Suggested by Alex Branham in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 362d3b3645..1a27fe877e 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -174,10 +174,15 @@ List the existing buffers (@code{list-buffers}). @cindex listing current buffers @kindex C-x C-b @findex list-buffers - To display a list of existing buffers, type @kbd{C-x C-b}. Each + To display a list of existing buffers, type @kbd{C-x C-b}. This +pops up a buffer menu in a buffer named @file{*Buffer List*}. Each line in the list shows one buffer's name, size, major mode and visited file. The buffers are listed in the order that they were current; the -buffers that were current most recently come first. +buffers that were current most recently come first. This section +describes how the list of buffers is displayed and how to interpret +the various indications in the list; see @ref{Several Buffers}, for +description of the special mode in the @file{*Buffer List*} buffer and +the commands available there. @samp{.} in the first field of a line indicates that the buffer is current. @samp{%} indicates a read-only buffer. @samp{*} indicates @@ -700,13 +705,20 @@ Customization}). @item M-x bs-show Make a list of buffers similarly to @kbd{M-x list-buffers} but customizable. +@item M-x ibuffer +Make a list of buffers and operate on them in Dired-like fashion. @end table +@findex bs-customize @kbd{M-x bs-show} pops up a buffer list similar to the one normally -displayed by @kbd{C-x C-b} but which you can customize. If you prefer +displayed by @kbd{C-x C-b}, but whose display you can customize in a +more flexible fashion. For example, you can specify the list of +buffer attributes to show, the minimum and maximum width of buffer +name column, a regexp for names of buffers that will never be shown +and those which will always be shown, etc. If you prefer this to the usual buffer list, you can bind this command to @kbd{C-x C-b}. To customize this buffer list, use the @code{bs} Custom group -(@pxref{Easy Customization}). +(@pxref{Easy Customization}), or invoke @kbd{bs-customize}. @findex msb-mode @cindex mode, MSB @@ -719,3 +731,8 @@ prefer. It replaces the bindings of @code{mouse-buffer-menu}, normally on @kbd{C-Down-mouse-1} and @kbd{C-@key{F10}}, and the menu bar buffer menu. You can customize the menu in the @code{msb} Custom group. + +@findex ibuffer + IBuffer is a major mode for viewing a list of buffers and operating +on them in a way analogous to that of Dired (@pxref{Dired}), including +filtering, marking, sorting in various ways, and acting on buffers. commit bc092fcaea7268f2339f0e92720a37e62cdca5b2 Author: Alan Mackenzie Date: Sat Dec 2 10:00:56 2017 +0000 For help commands, ensure all keys of a mouse sequence are reported. This solves the problem where read_key_sequence initializes and uses a global buffer raw_keybuf, yet is called recusrsively. The initialization is now done elsewhere, avoiding the reinitialization of that global buffer. * src/keyboard.c (command_loop_1, read_key_sequence_vs): Initialize raw_event_count before calling read_key_sequence. (read_char_x_menu_prompt): Call x_popup_menu_1 in place of Fx_popup_menu. (init_raw_keybuf_count): New function. (read_key_sequence): Remove initialization of raw_event_count. Add a missing GROW_RAW_KEYBUF invocation. * src/keyboard.h: (init_raw_keybuf_count): New declaration. * src/menu.c: (x_popup_menu_1): New function with the functionality of the former Fx_popup_menu. (Fx_popup_menu): Replace with function which initializes raw_event_count then calls x_popup_menu_1. * src/menu.h: (x_popup_menu_1): New declaration. diff --git a/src/keyboard.c b/src/keyboard.c index b18dc1abbe..375aa4f606 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -43,6 +43,7 @@ along with GNU Emacs. If not, see . */ #include "systime.h" #include "atimer.h" #include "process.h" +#include "menu.h" #include #ifdef HAVE_PTHREAD @@ -121,17 +122,12 @@ ptrdiff_t this_command_key_count; /* This vector is used as a buffer to record the events that were actually read by read_key_sequence. */ -static Lisp_Object raw_keybuf_buffer; -static int raw_keybuf_count_buffer; -static Lisp_Object *raw_keybuf = &raw_keybuf_buffer; -static int *raw_keybuf_count = &raw_keybuf_count_buffer; - -#define GROW_RAW_KEYBUF(inc) \ - if (*raw_keybuf_count > ASIZE (*raw_keybuf) - (inc)) \ - *raw_keybuf = \ - larger_vector (*raw_keybuf, \ - (inc) + *raw_keybuf_count - ASIZE (*raw_keybuf), \ - -1) +static Lisp_Object raw_keybuf; +static int raw_keybuf_count; + +#define GROW_RAW_KEYBUF \ + if (raw_keybuf_count == ASIZE (raw_keybuf)) \ + raw_keybuf = larger_vector (raw_keybuf, 1, -1) /* Number of elements of this_command_keys that precede this key sequence. */ @@ -1370,8 +1366,7 @@ command_loop_1 (void) Vthis_command_keys_shift_translated = Qnil; /* Read next key sequence; i gets its length. */ - raw_keybuf_count = &raw_keybuf_count_buffer; /* For safety */ - raw_keybuf = &raw_keybuf_buffer; /* Ditto */ + raw_keybuf_count = 0; i = read_key_sequence (keybuf, ARRAYELTS (keybuf), Qnil, 0, 1, 1, 0); @@ -8460,7 +8455,7 @@ read_char_x_menu_prompt (Lisp_Object map, /* Display the menu and get the selection. */ Lisp_Object value; - value = Fx_popup_menu (prev_event, get_keymap (map, 0, 1)); + value = x_popup_menu_1 (prev_event, get_keymap (map, 0, 1)); if (CONSP (value)) { Lisp_Object tem; @@ -8870,6 +8865,11 @@ test_undefined (Lisp_Object binding) && EQ (Fcommand_remapping (binding, Qnil, Qnil), Qundefined))); } +void init_raw_keybuf_count (void) +{ + raw_keybuf_count = 0; +} + /* Read a sequence of keys that ends with a non prefix character, storing it in KEYBUF, a buffer of size BUFSIZE. Prompt with PROMPT. @@ -8920,11 +8920,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, /* How many keys there are in the current key sequence. */ int t; - int *outer_raw_keybuf_count; - Lisp_Object *outer_raw_keybuf; - int inner_raw_keybuf_count_buffer; - Lisp_Object inner_raw_keybuf_buffer = Fmake_vector (make_number (30), Qnil); - /* The length of the echo buffer when we started reading, and the length of this_command_keys when we started reading. */ ptrdiff_t echo_start UNINIT; @@ -8985,7 +8980,11 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, /* List of events for which a fake prefix key has been generated. */ Lisp_Object fake_prefixed_keys = Qnil; - *raw_keybuf_count = 0; + /* raw_keybuf_count is now initialized in (most of) the callers of + read_key_sequence. This is so that in a recursive call (for + mouse menus) a spurious initialization doesn't erase the contents + of raw_keybuf created by the outer call. */ + /* raw_keybuf_count = 0; */ last_nonmenu_event = Qnil; @@ -9157,23 +9156,11 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, { KBOARD *interrupted_kboard = current_kboard; struct frame *interrupted_frame = SELECTED_FRAME (); - int i; - outer_raw_keybuf_count = raw_keybuf_count; - outer_raw_keybuf = raw_keybuf; - inner_raw_keybuf_count_buffer = 0; - raw_keybuf_count = &inner_raw_keybuf_count_buffer; - raw_keybuf = &inner_raw_keybuf_buffer; /* Calling read_char with COMMANDFLAG = -2 avoids redisplay in read_char and its subroutines. */ key = read_char (prevent_redisplay ? -2 : NILP (prompt), current_binding, last_nonmenu_event, &used_mouse_menu, NULL); - raw_keybuf_count = outer_raw_keybuf_count; - raw_keybuf = outer_raw_keybuf; - GROW_RAW_KEYBUF (inner_raw_keybuf_count_buffer); - for (i = 0; i < inner_raw_keybuf_count_buffer; i++) - ASET (*raw_keybuf, (*raw_keybuf_count)++, - AREF (inner_raw_keybuf_buffer, i)); if ((INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */ /* When switching to a new tty (with a new keyboard), read_char returns the new buffer, rather than -2 @@ -9281,9 +9268,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, && XINT (key) == quit_char && current_buffer != starting_buffer) { - GROW_RAW_KEYBUF (1); - ASET (*raw_keybuf, *raw_keybuf_count, key); - (*raw_keybuf_count)++; + GROW_RAW_KEYBUF; + ASET (raw_keybuf, raw_keybuf_count, key); + raw_keybuf_count++; keybuf[t++] = key; mock_input = t; Vquit_flag = Qnil; @@ -9322,9 +9309,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, current_binding = active_maps (first_event); } - GROW_RAW_KEYBUF (1); - ASET (*raw_keybuf, *raw_keybuf_count, key); - (*raw_keybuf_count)++; + GROW_RAW_KEYBUF; + ASET (raw_keybuf, raw_keybuf_count, key); + raw_keybuf_count++; } /* Clicks in non-text areas get prefixed by the symbol @@ -9370,9 +9357,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, && BUFFERP (XWINDOW (window)->contents) && XBUFFER (XWINDOW (window)->contents) != current_buffer) { - GROW_RAW_KEYBUF (1); - ASET (*raw_keybuf, *raw_keybuf_count, key); - (*raw_keybuf_count)++; + GROW_RAW_KEYBUF; + ASET (raw_keybuf, raw_keybuf_count, key); + raw_keybuf_count++; keybuf[t] = key; mock_input = t + 1; @@ -9865,6 +9852,7 @@ read_key_sequence_vs (Lisp_Object prompt, Lisp_Object continue_echo, cancel_hourglass (); #endif + raw_keybuf_count = 0; i = read_key_sequence (keybuf, ARRAYELTS (keybuf), prompt, ! NILP (dont_downcase_last), ! NILP (can_return_switch_frame), 0, 0); @@ -10145,7 +10133,7 @@ shows the events before all translations (except for input methods). The value is always a vector. */) (void) { - return Fvector (*raw_keybuf_count, XVECTOR (*raw_keybuf)->contents); + return Fvector (raw_keybuf_count, XVECTOR (raw_keybuf)->contents); } DEFUN ("clear-this-command-keys", Fclear_this_command_keys, @@ -11290,8 +11278,8 @@ syms_of_keyboard (void) this_command_keys = Fmake_vector (make_number (40), Qnil); staticpro (&this_command_keys); - raw_keybuf_buffer = Fmake_vector (make_number (30), Qnil); - staticpro (raw_keybuf); + raw_keybuf = Fmake_vector (make_number (30), Qnil); + staticpro (&raw_keybuf); DEFSYM (Qcommand_execute, "command-execute"); DEFSYM (Qinternal_echo_keystrokes_prefix, "internal-echo-keystrokes-prefix"); diff --git a/src/keyboard.h b/src/keyboard.h index 662d8e4a4f..c232e778e2 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -438,6 +438,7 @@ extern unsigned int timers_run; extern bool menu_separator_name_p (const char *); extern bool parse_menu_item (Lisp_Object, int); +extern void init_raw_keybuf_count (void); extern KBOARD *allocate_kboard (Lisp_Object); extern void delete_kboard (KBOARD *); extern void not_single_kboard_state (KBOARD *); diff --git a/src/menu.c b/src/menu.c index d569b4b29b..b40c2c04ce 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1112,51 +1112,8 @@ into menu items. */) return Qnil; } - -DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, - doc: /* Pop up a deck-of-cards menu and return user's selection. -POSITION is a position specification. This is either a mouse button event -or a list ((XOFFSET YOFFSET) WINDOW) -where XOFFSET and YOFFSET are positions in pixels from the top left -corner of WINDOW. (WINDOW may be a window or a frame object.) -This controls the position of the top left of the menu as a whole. -If POSITION is t, it means to use the current mouse position. - -MENU is a specifier for a menu. For the simplest case, MENU is a keymap. -The menu items come from key bindings that have a menu string as well as -a definition; actually, the "definition" in such a key binding looks like -\(STRING . REAL-DEFINITION). To give the menu a title, put a string into -the keymap as a top-level element. - -If REAL-DEFINITION is nil, that puts a nonselectable string in the menu. -Otherwise, REAL-DEFINITION should be a valid key binding definition. - -You can also use a list of keymaps as MENU. - Then each keymap makes a separate pane. - -When MENU is a keymap or a list of keymaps, the return value is the -list of events corresponding to the user's choice. Note that -`x-popup-menu' does not actually execute the command bound to that -sequence of events. - -Alternatively, you can specify a menu of multiple panes - with a list of the form (TITLE PANE1 PANE2...), -where each pane is a list of form (TITLE ITEM1 ITEM2...). -Each ITEM is normally a cons cell (STRING . VALUE); -but a string can appear as an item--that makes a nonselectable line -in the menu. -With this form of menu, the return value is VALUE from the chosen item. - -If POSITION is nil, don't display the menu at all, just precalculate the -cached information about equivalent key sequences. - -If the user gets rid of the menu without making a valid choice, for -instance by clicking the mouse away from a valid choice or by typing -keyboard input, then this normally results in a quit and -`x-popup-menu' does not return. But if POSITION is a mouse button -event (indicating that the user invoked the menu with the mouse) then -no quit occurs and `x-popup-menu' returns nil. */) - (Lisp_Object position, Lisp_Object menu) +Lisp_Object +x_popup_menu_1 (Lisp_Object position, Lisp_Object menu) { Lisp_Object keymap, tem, tem2; int xpos = 0, ypos = 0; @@ -1443,6 +1400,55 @@ no quit occurs and `x-popup-menu' returns nil. */) return selection; } +DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, + doc: /* Pop up a deck-of-cards menu and return user's selection. +POSITION is a position specification. This is either a mouse button event +or a list ((XOFFSET YOFFSET) WINDOW) +where XOFFSET and YOFFSET are positions in pixels from the top left +corner of WINDOW. (WINDOW may be a window or a frame object.) +This controls the position of the top left of the menu as a whole. +If POSITION is t, it means to use the current mouse position. + +MENU is a specifier for a menu. For the simplest case, MENU is a keymap. +The menu items come from key bindings that have a menu string as well as +a definition; actually, the "definition" in such a key binding looks like +\(STRING . REAL-DEFINITION). To give the menu a title, put a string into +the keymap as a top-level element. + +If REAL-DEFINITION is nil, that puts a nonselectable string in the menu. +Otherwise, REAL-DEFINITION should be a valid key binding definition. + +You can also use a list of keymaps as MENU. + Then each keymap makes a separate pane. + +When MENU is a keymap or a list of keymaps, the return value is the +list of events corresponding to the user's choice. Note that +`x-popup-menu' does not actually execute the command bound to that +sequence of events. + +Alternatively, you can specify a menu of multiple panes + with a list of the form (TITLE PANE1 PANE2...), +where each pane is a list of form (TITLE ITEM1 ITEM2...). +Each ITEM is normally a cons cell (STRING . VALUE); +but a string can appear as an item--that makes a nonselectable line +in the menu. +With this form of menu, the return value is VALUE from the chosen item. + +If POSITION is nil, don't display the menu at all, just precalculate the +cached information about equivalent key sequences. + +If the user gets rid of the menu without making a valid choice, for +instance by clicking the mouse away from a valid choice or by typing +keyboard input, then this normally results in a quit and +`x-popup-menu' does not return. But if POSITION is a mouse button +event (indicating that the user invoked the menu with the mouse) then +no quit occurs and `x-popup-menu' returns nil. */) + (Lisp_Object position, Lisp_Object menu) +{ + init_raw_keybuf_count (); + return x_popup_menu_1 (position, menu); +} + /* If F's terminal is not capable of displaying a popup dialog, emulate it with a menu. */ diff --git a/src/menu.h b/src/menu.h index 1469cc87d9..3335616338 100644 --- a/src/menu.h +++ b/src/menu.h @@ -60,4 +60,5 @@ extern Lisp_Object ns_menu_show (struct frame *, int, int, int, extern Lisp_Object tty_menu_show (struct frame *, int, int, int, Lisp_Object, const char **); extern ptrdiff_t menu_item_width (const unsigned char *); +extern Lisp_Object x_popup_menu_1 (Lisp_Object position, Lisp_Object menu); #endif /* MENU_H */ commit 66ec92af0060952ef7b53a8f1c07177cf38b3145 Author: Eli Zaretskii Date: Sat Dec 2 10:57:15 2017 +0200 Fix backing up remote files in local directories on MS-Windows * lisp/files.el (make-backup-file-name-1): Support remote file names correctly when they are backed up into a local directory on MS-Windows and MS-DOS. (Bug#29440) diff --git a/lisp/files.el b/lisp/files.el index 8021e1bbed..1bdb6d38ab 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4653,25 +4653,35 @@ The function `find-backup-file-name' also uses this." ;; "/drive_x". (or (file-name-absolute-p file) (setq file (expand-file-name file))) ; make defaults explicit - ;; Replace any invalid file-name characters (for the - ;; case of backing up remote files). - (setq file (expand-file-name (convert-standard-filename file))) - (if (eq (aref file 1) ?:) - (setq file (concat "/" - "drive_" - (char-to-string (downcase (aref file 0))) - (if (eq (aref file 2) ?/) - "" - "/") - (substring file 2))))) - ;; Make the name unique by substituting directory - ;; separators. It may not really be worth bothering about - ;; doubling `!'s in the original name... - (expand-file-name - (subst-char-in-string - ?/ ?! - (replace-regexp-in-string "!" "!!" file)) - backup-directory)) + (cond + ((file-remote-p file) + ;; Remove the leading slash, if any, to prevent + ;; convert-standard-filename from converting that to a + ;; backslash. + (and (memq (aref file 0) '(?/ ?\\)) + (setq file (substring file 1))) + ;; Replace any invalid file-name characters, then + ;; prepend the leading slash back. + (setq file (concat "/" (convert-standard-filename file)))) + (t + ;; Replace any invalid file-name characters. + (setq file (expand-file-name (convert-standard-filename file))) + (if (eq (aref file 1) ?:) + (setq file (concat "/" + "drive_" + (char-to-string (downcase (aref file 0))) + (if (eq (aref file 2) ?/) + "" + "/") + (substring file 2)))))) + ;; Make the name unique by substituting directory + ;; separators. It may not really be worth bothering about + ;; doubling `!'s in the original name... + (expand-file-name + (subst-char-in-string + ?/ ?! + (replace-regexp-in-string "!" "!!" file)) + backup-directory))) (expand-file-name (file-name-nondirectory file) (file-name-as-directory abs-backup-directory)))))) commit 7e61e74da7ee3fe5eaa5ca76d23be84831c394c9 Author: Glenn Morris Date: Fri Dec 1 19:59:11 2017 -0500 * doc/emacs/mule.texi (Output Coding): Clarify sendmail coding. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 9ef3110245..78f77cb300 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -1002,16 +1002,15 @@ its name at the prompt.) @vindex sendmail-coding-system When you send a mail message (@pxref{Sending Mail}), Emacs has four different ways to determine the coding system to use -for encoding the message text. It tries the buffer's own value of +for encoding the message text. It first tries the buffer's own value of @code{buffer-file-coding-system}, if that is non-@code{nil}. Otherwise, it uses the value of @code{sendmail-coding-system}, if that -is non-@code{nil}. The third way is to use the default coding system -for new files, which is controlled by your choice of language -@c i.e., default-sendmail-coding-system -environment, if that is non-@code{nil}. If all of these three values -are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding -system. -@c FIXME? Where does the Latin-1 default come in? +is non-@code{nil}. Thirdly, it uses the value of +@code{default-sendmail-coding-system}. +If all of these three values are @code{nil}, Emacs encodes outgoing +mail using the default coding system for new files (i.e., the +default value of @code{buffer-file-coding-system}), which is +controlled by your choice of language environment. @node Text Coding @section Specifying a Coding System for File Text commit 1e25cd79ff28c8c84e5810e1a44a241fc8fac66c Author: John Wiegley Date: Fri Dec 1 12:42:58 2017 -0800 Revert "Fix backing up remote files in local directories on MS-Windows" This reverts commit 8c8b6732882248df4ca3b687e0a4b4e5e4ab3777. diff --git a/lisp/files.el b/lisp/files.el index 9a79b2a0c7..8021e1bbed 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4653,41 +4653,25 @@ The function `find-backup-file-name' also uses this." ;; "/drive_x". (or (file-name-absolute-p file) (setq file (expand-file-name file))) ; make defaults explicit - (cond - ((file-remote-p file) - ;; Remove the leading slash, if any, to prevent - ;; expand-file-name from adding a drive letter. - (and (memq (aref file 0) '(?/ ?\\)) - (setq file (substring file 1))) - ;; Replace any invalid file-name characters. - (setq file (convert-standard-filename file)) - ;; Replace slashes to make the file name unique, and - ;; prepend backup-directory. - (expand-file-name - (subst-char-in-string - ?/ ?! - (replace-regexp-in-string "!" "!!" - (concat "/" file))) - backup-directory)) - (t - ;; Replace any invalid file-name characters. - (setq file (expand-file-name (convert-standard-filename file))) - (if (eq (aref file 1) ?:) - (setq file (concat "/" - "drive_" - (char-to-string (downcase (aref file 0))) - (if (eq (aref file 2) ?/) - "" - "/") - (substring file 2)))) - ;; Make the name unique by substituting directory - ;; separators. It may not really be worth bothering about - ;; doubling `!'s in the original name... - (expand-file-name - (subst-char-in-string - ?/ ?! - (replace-regexp-in-string "!" "!!" file)) - backup-directory))))) + ;; Replace any invalid file-name characters (for the + ;; case of backing up remote files). + (setq file (expand-file-name (convert-standard-filename file))) + (if (eq (aref file 1) ?:) + (setq file (concat "/" + "drive_" + (char-to-string (downcase (aref file 0))) + (if (eq (aref file 2) ?/) + "" + "/") + (substring file 2))))) + ;; Make the name unique by substituting directory + ;; separators. It may not really be worth bothering about + ;; doubling `!'s in the original name... + (expand-file-name + (subst-char-in-string + ?/ ?! + (replace-regexp-in-string "!" "!!" file)) + backup-directory)) (expand-file-name (file-name-nondirectory file) (file-name-as-directory abs-backup-directory)))))) commit f52d79500b2c78ad888691684de7e40cb7483df8 Author: Eli Zaretskii Date: Fri Dec 1 21:56:31 2017 +0200 Fix a typo in ELisp manual * doc/lispref/sequences.texi (Sequence Functions): Fix the example of using 'seq-uniq'. (Bug#29524) diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 5ae1567c12..4fba880803 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -853,7 +853,7 @@ it is a function of two arguments to use instead of the default @code{equal}. @end group @group (seq-uniq '(1 2 2.0 1.0) #'=) -@result{} [3 4] +@result{} [1 2] @end group @end example @end defun commit bf26fc365682bebc2636682759dfe0c4fa37ca10 Author: Eli Zaretskii Date: Fri Dec 1 18:59:13 2017 +0200 * lisp/composite.el (find-composition): Fix a typo in the doc string. diff --git a/lisp/composite.el b/lisp/composite.el index 7293d7c15c..29fc753d5a 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -338,7 +338,7 @@ chunk of text that is automatically composed. If such a chunk is found closer to POS than the position that has `composition' property, the value is a list of FROM, TO, and a glyph-string that specifies how the chunk is to be composed; DETAIL-P is -inored in this case. See the function `composition-get-gstring' +ignored in this case. See the function `composition-get-gstring' for the format of the glyph-string." (let ((result (find-composition-internal pos limit string detail-p))) (if (and detail-p (> (length result) 3) (nth 2 result) (not (nth 3 result))) commit 34a21c3bf6205f0a3c32a8962fdd3f6a84405fe0 Author: Glenn Morris Date: Fri Dec 1 06:27:29 2017 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 78e1065aae..0ae0ead498 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -3858,7 +3858,7 @@ Key bindings: \(fn)" t nil) (autoload 'c-or-c++-mode "cc-mode" "\ -Analyse buffer and enable either C or C++ mode. +Analyze buffer and enable either C or C++ mode. Some people and projects use .h extension for C++ header files which is also the one used for C header files. This makes @@ -9150,11 +9150,15 @@ Toggle edebugging of all forms. (autoload 'ediff-files "ediff" "\ Run Ediff on a pair of files, FILE-A and FILE-B. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. \(fn FILE-A FILE-B &optional STARTUP-HOOKS)" t nil) (autoload 'ediff-files3 "ediff" "\ Run Ediff on three files, FILE-A, FILE-B, and FILE-C. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. \(fn FILE-A FILE-B FILE-C &optional STARTUP-HOOKS)" t nil) @@ -9178,6 +9182,13 @@ If this file is a backup, `ediff' it with its original. (autoload 'ediff-buffers "ediff" "\ Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. JOB-NAME is a +symbol describing the Ediff job type; it defaults to +`ediff-buffers', but can also be one of +`ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor', +`ediff-last-dir-C', `ediff-buffers3', `ediff-merge-buffers', or +`ediff-merge-buffers-with-ancestor'. \(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS JOB-NAME)" t nil) @@ -9185,6 +9196,13 @@ Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B. (autoload 'ediff-buffers3 "ediff" "\ Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. JOB-NAME is a +symbol describing the Ediff job type; it defaults to +`ediff-buffers3', but can also be one of +`ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor', +`ediff-last-dir-C', `ediff-buffers', `ediff-merge-buffers', or +`ediff-merge-buffers-with-ancestor'. \(fn BUFFER-A BUFFER-B BUFFER-C &optional STARTUP-HOOKS JOB-NAME)" t nil) @@ -9221,6 +9239,7 @@ regular expression; only file names that match the regexp are considered. Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have the same name in both. The third argument, REGEXP, is nil or a regular expression; only file names that match the regexp are considered. +MERGE-AUTOSTORE-DIR is the directory in which to store merged files. \(fn DIR1 DIR2 REGEXP &optional MERGE-AUTOSTORE-DIR)" t nil) @@ -9232,6 +9251,7 @@ Ediff merges files that have identical names in DIR1, DIR2. If a pair of files in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge without ancestor. The fourth argument, REGEXP, is nil or a regular expression; only file names that match the regexp are considered. +MERGE-AUTOSTORE-DIR is the directory in which to store merged files. \(fn DIR1 DIR2 ANCESTOR-DIR REGEXP &optional MERGE-AUTOSTORE-DIR)" t nil) @@ -9239,6 +9259,7 @@ only file names that match the regexp are considered. Run Ediff on a directory, DIR1, merging its files with their revisions. The second argument, REGEXP, is a regular expression that filters the file names. Only the files that are under revision control are taken into account. +MERGE-AUTOSTORE-DIR is the directory in which to store merged files. \(fn DIR1 REGEXP &optional MERGE-AUTOSTORE-DIR)" t nil) @@ -9248,6 +9269,7 @@ names. Only the files that are under revision control are taken into account. Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors. The second argument, REGEXP, is a regular expression that filters the file names. Only the files that are under revision control are taken into account. +MERGE-AUTOSTORE-DIR is the directory in which to store merged files. \(fn DIR1 REGEXP &optional MERGE-AUTOSTORE-DIR)" t nil) @@ -9261,6 +9283,8 @@ With prefix argument, DUMB-MODE, or on a non-windowing display, works as follows: If WIND-A is nil, use selected window. If WIND-B is nil, use window next to WIND-A. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. \(fn DUMB-MODE &optional WIND-A WIND-B STARTUP-HOOKS)" t nil) @@ -9270,23 +9294,31 @@ With prefix argument, DUMB-MODE, or on a non-windowing display, works as follows: If WIND-A is nil, use selected window. If WIND-B is nil, use window next to WIND-A. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. \(fn DUMB-MODE &optional WIND-A WIND-B STARTUP-HOOKS)" t nil) (autoload 'ediff-regions-wordwise "ediff" "\ Run Ediff on a pair of regions in specified buffers. +BUFFER-A and BUFFER-B are the buffers to be compared. Regions (i.e., point and mark) can be set in advance or marked interactively. This function is effective only for relatively small regions, up to 200 lines. For large regions, use `ediff-regions-linewise'. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. \(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS)" t nil) (autoload 'ediff-regions-linewise "ediff" "\ Run Ediff on a pair of regions in specified buffers. +BUFFER-A and BUFFER-B are the buffers to be compared. Regions (i.e., point and mark) can be set in advance or marked interactively. Each region is enlarged to contain full lines. This function is effective for large regions, over 100-200 lines. For small regions, use `ediff-regions-wordwise'. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. \(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS)" t nil) @@ -9294,11 +9326,20 @@ lines. For small regions, use `ediff-regions-wordwise'. (autoload 'ediff-merge-files "ediff" "\ Merge two files without ancestor. +FILE-A and FILE-B are the names of the files to be merged. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. MERGE-BUFFER-FILE +is the name of the file to be associated with the merge buffer.. \(fn FILE-A FILE-B &optional STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil) (autoload 'ediff-merge-files-with-ancestor "ediff" "\ Merge two files with ancestor. +FILE-A and FILE-B are the names of the files to be merged, and +FILE-ANCESTOR is the name of the ancestor file. STARTUP-HOOKS is +a list of functions that Emacs calls without arguments after +setting up the Ediff buffers. MERGE-BUFFER-FILE is the name of +the file to be associated with the merge buffer. \(fn FILE-A FILE-B FILE-ANCESTOR &optional STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil) @@ -9306,25 +9347,49 @@ Merge two files with ancestor. (autoload 'ediff-merge-buffers "ediff" "\ Merge buffers without ancestor. +BUFFER-A and BUFFER-B are the buffers to be merged. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. JOB-NAME is a +symbol describing the Ediff job type; it defaults to +`ediff-merge-buffers', but can also be one of +`ediff-merge-files-with-ancestor', `ediff-last-dir-ancestor', +`ediff-last-dir-C', `ediff-buffers', `ediff-buffers3', or +`ediff-merge-buffers-with-ancestor'. MERGE-BUFFER-FILE is the +name of the file to be associated with the merge buffer. \(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS JOB-NAME MERGE-BUFFER-FILE)" t nil) (autoload 'ediff-merge-buffers-with-ancestor "ediff" "\ Merge buffers with ancestor. +BUFFER-A and BUFFER-B are the buffers to be merged, and +BUFFER-ANCESTOR is their ancestor. STARTUP-HOOKS is a list of +functions that Emacs calls without arguments after setting up the +Ediff buffers. JOB-NAME is a symbol describing the Ediff job +type; it defaults to `ediff-merge-buffers-with-ancestor', but can +also be one of `ediff-merge-files-with-ancestor', +`ediff-last-dir-ancestor', `ediff-last-dir-C', `ediff-buffers', +`ediff-buffers3', or `ediff-merge-buffers'. MERGE-BUFFER-FILE is +the name of the file to be associated with the merge buffer. \(fn BUFFER-A BUFFER-B BUFFER-ANCESTOR &optional STARTUP-HOOKS JOB-NAME MERGE-BUFFER-FILE)" t nil) (autoload 'ediff-merge-revisions "ediff" "\ Run Ediff by merging two revisions of a file. -The file is the optional FILE argument or the file visited by the current -buffer. +The file is the optional FILE argument or the file visited by the +current buffer. STARTUP-HOOKS is a list of functions that Emacs +calls without arguments after setting up the Ediff buffers. +MERGE-BUFFER-FILE is the name of the file to be associated with +the merge buffer. \(fn &optional FILE STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil) (autoload 'ediff-merge-revisions-with-ancestor "ediff" "\ Run Ediff by merging two revisions of a file with a common ancestor. -The file is the optional FILE argument or the file visited by the current -buffer. +The file is the optional FILE argument or the file visited by the +current buffer. STARTUP-HOOKS is a list of functions that Emacs +calls without arguments after setting up the Ediff buffers. +MERGE-BUFFER-FILE is the name of the file to be associated with +the merge buffer. \(fn &optional FILE STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil) @@ -9332,8 +9397,8 @@ buffer. Query for a file name, and then run Ediff by patching that file. If optional PATCH-BUF is given, use the patch in that buffer and don't ask the user. -If prefix argument, then: if even argument, assume that the patch is in a -buffer. If odd -- assume it is in a file. +If prefix argument ARG, then: if even argument, assume that the +patch is in a buffer. If odd -- assume it is in a file. \(fn &optional ARG PATCH-BUF)" t nil) @@ -9344,7 +9409,7 @@ prompts for the buffer or a file, depending on the answer. With ARG=1, assumes the patch is in a file and prompts for the file. With ARG=2, assumes the patch is in a buffer and prompts for the buffer. PATCH-BUF is an optional argument, which specifies the buffer that contains the -patch. If not given, the user is prompted according to the prefix argument. +patch. If not given, the user is prompted according to the prefix argument. \(fn &optional ARG PATCH-BUF)" t nil) @@ -9357,6 +9422,8 @@ Run Ediff by comparing versions of a file. The file is an optional FILE argument or the file entered at the prompt. Default: the file visited by the current buffer. Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'. +STARTUP-HOOKS is a list of functions that Emacs calls without +arguments after setting up the Ediff buffers. \(fn &optional FILE STARTUP-HOOKS)" t nil) @@ -9375,42 +9442,42 @@ With optional NODE, goes to that node. \(fn &optional NODE)" t nil) (autoload 'ediff-files-command "ediff" "\ - +Call `ediff-files' with the next two command line arguments. \(fn)" nil nil) (autoload 'ediff3-files-command "ediff" "\ - +Call `ediff3-files' with the next three command line arguments. \(fn)" nil nil) (autoload 'ediff-merge-command "ediff" "\ - +Call `ediff-merge-files' with the next two command line arguments. \(fn)" nil nil) (autoload 'ediff-merge-with-ancestor-command "ediff" "\ - +Call `ediff-merge-files-with-ancestor' with the next three command line arguments. \(fn)" nil nil) (autoload 'ediff-directories-command "ediff" "\ - +Call `ediff-directories' with the next three command line arguments. \(fn)" nil nil) (autoload 'ediff-directories3-command "ediff" "\ - +Call `ediff-directories3' with the next four command line arguments. \(fn)" nil nil) (autoload 'ediff-merge-directories-command "ediff" "\ - +Call `ediff-merge-directories' with the next three command line arguments. \(fn)" nil nil) (autoload 'ediff-merge-directories-with-ancestor-command "ediff" "\ - +Call `ediff-merge-directories-with-ancestor' with the next four command line arguments. \(fn)" nil nil) @@ -10548,7 +10615,7 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. ;;; Generated autoloads from erc/erc-autoaway.el (autoload 'erc-autoaway-mode "erc-autoaway") -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-autoaway" '("erc-auto" "autoaway"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-autoaway" '("erc-auto"))) ;;;*** @@ -10563,7 +10630,7 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. ;;; Generated autoloads from erc/erc-button.el (autoload 'erc-button-mode "erc-button" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-button" '("erc-" "button"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-button" '("erc-"))) ;;;*** @@ -10571,7 +10638,7 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. ;;; Generated autoloads from erc/erc-capab.el (autoload 'erc-capab-identify-mode "erc-capab" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-capab" '("erc-capab-identify-" "capab-identify"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-capab" '("erc-capab-identify-"))) ;;;*** @@ -10610,7 +10677,7 @@ that subcommand. \(fn PROC NICK LOGIN HOST TO QUERY)" nil nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-dcc" '("erc-" "pcomplete/erc-mode/" "dcc"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-dcc" '("erc-" "pcomplete/erc-mode/"))) ;;;*** @@ -10619,7 +10686,7 @@ that subcommand. ;;; Generated autoloads from erc/erc-desktop-notifications.el (autoload 'erc-notifications-mode "erc-desktop-notifications" "" t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-desktop-notifications" '("notifications" "erc-notifications-"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-desktop-notifications" '("erc-notifications-"))) ;;;*** @@ -10705,7 +10772,7 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'. ;;;### (autoloads nil "erc-goodies" "erc/erc-goodies.el" (0 0 0 0)) ;;; Generated autoloads from erc/erc-goodies.el -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-goodies" '("erc-" "unmorse" "scrolltobottom" "smiley" "irccontrols" "noncommands" "keep-place" "move-to-prompt" "readonly"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-goodies" '("erc-"))) ;;;*** @@ -10735,7 +10802,7 @@ system. \(fn &rest IGNORE)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-identd" '("erc-identd-" "identd"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-identd" '("erc-identd-"))) ;;;*** @@ -10755,7 +10822,7 @@ system. ;;; Generated autoloads from erc/erc-join.el (autoload 'erc-autojoin-mode "erc-join" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-join" '("erc-" "autojoin"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-join" '("erc-"))) ;;;*** @@ -10770,7 +10837,7 @@ system. ;;; Generated autoloads from erc/erc-list.el (autoload 'erc-list-mode "erc-list") -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-list" '("erc-" "list"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-list" '("erc-"))) ;;;*** @@ -10801,7 +10868,7 @@ You can save every individual message by putting this function on \(fn &optional BUFFER)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-log" '("erc-" "log"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-log" '("erc-"))) ;;;*** @@ -10849,7 +10916,7 @@ Delete dangerous-host interactively to `erc-dangerous-hosts'. \(fn)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-match" '("erc-" "match"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-match" '("erc-"))) ;;;*** @@ -10857,7 +10924,7 @@ Delete dangerous-host interactively to `erc-dangerous-hosts'. ;;; Generated autoloads from erc/erc-menu.el (autoload 'erc-menu-mode "erc-menu" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-menu" '("erc-menu-" "menu"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-menu" '("erc-menu-"))) ;;;*** @@ -10871,7 +10938,7 @@ Show who's gone. \(fn)" nil nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-netsplit" '("erc-" "netsplit"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-netsplit" '("erc-"))) ;;;*** @@ -10891,7 +10958,7 @@ Interactively select a server to connect to using `erc-server-alist'. \(fn)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-networks" '("erc-" "networks"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-networks" '("erc-"))) ;;;*** @@ -10911,7 +10978,7 @@ with args, toggle notify status of people. \(fn)" nil nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-notify" '("erc-" "notify"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-notify" '("erc-"))) ;;;*** @@ -10919,7 +10986,7 @@ with args, toggle notify status of people. ;;; Generated autoloads from erc/erc-page.el (autoload 'erc-page-mode "erc-page") -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-page" '("erc-" "page"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-page" '("erc-"))) ;;;*** @@ -10936,7 +11003,7 @@ with args, toggle notify status of people. ;;; Generated autoloads from erc/erc-replace.el (autoload 'erc-replace-mode "erc-replace") -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-replace" '("replace" "erc-replace-"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-replace" '("erc-replace-"))) ;;;*** @@ -10944,7 +11011,7 @@ with args, toggle notify status of people. ;;; Generated autoloads from erc/erc-ring.el (autoload 'erc-ring-mode "erc-ring" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-ring" '("erc-" "ring"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-ring" '("erc-"))) ;;;*** @@ -10964,7 +11031,7 @@ When called interactively, read the password using `read-passwd'. \(fn PASSWORD)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-services" '("erc-" "services"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-services" '("erc-"))) ;;;*** @@ -10972,7 +11039,7 @@ When called interactively, read the password using `read-passwd'. ;;; Generated autoloads from erc/erc-sound.el (autoload 'erc-sound-mode "erc-sound") -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-sound" '("erc-" "sound"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-sound" '("erc-"))) ;;;*** @@ -10995,7 +11062,7 @@ This will add a speedbar major display mode. ;;; Generated autoloads from erc/erc-spelling.el (autoload 'erc-spelling-mode "erc-spelling" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-spelling" '("erc-spelling-" "spelling"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-spelling" '("erc-spelling-"))) ;;;*** @@ -11003,7 +11070,7 @@ This will add a speedbar major display mode. ;;; Generated autoloads from erc/erc-stamp.el (autoload 'erc-timestamp-mode "erc-stamp" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-stamp" '("erc-" "stamp"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-stamp" '("erc-"))) ;;;*** @@ -11031,7 +11098,7 @@ keybindings will not do anything useful. \(fn &optional ARG)" t nil) (autoload 'erc-track-mode "erc-track" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-track" '("erc-" "track"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-track" '("erc-"))) ;;;*** @@ -11053,7 +11120,7 @@ Meant to be used in hooks, like `erc-insert-post-hook'. \(fn)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-truncate" '("truncate" "erc-max-buffer-size"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-truncate" '("erc-max-buffer-size"))) ;;;*** @@ -11066,7 +11133,7 @@ Add a file to `erc-xdcc-files'. \(fn FILE)" t nil) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-xdcc" '("erc-" "xdcc"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "erc-xdcc" '("erc-"))) ;;;*** @@ -12691,14 +12758,14 @@ See `find-name-arg' to customize the arguments. \(fn DIR PATTERN)" t nil) (autoload 'find-grep-dired "find-dired" "\ -Find files in DIR matching a regexp REGEXP and start Dired on output. +Find files in DIR that contain matches for REGEXP and start Dired on output. The command run (after changing into DIR) is find . \\( -type f -exec `grep-program' `find-grep-options' \\ -e REGEXP {} \\; \\) -ls -where the car of the variable `find-ls-option' specifies what to -use in place of \"-ls\" as the final argument. +where the first string in the value of the variable `find-ls-option' +specifies what to use in place of \"-ls\" as the final argument. \(fn DIR REGEXP)" t nil) @@ -13590,7 +13657,7 @@ and choose the directory as the fortune-file. Minimum set of parameters to filter for live (on-session) framesets. DO NOT MODIFY. See `frameset-filter-alist' for a full description.") -(defvar frameset-persistent-filter-alist (nconc '((background-color . frameset-filter-sanitize-color) (buffer-list . :never) (buffer-predicate . :never) (buried-buffer-list . :never) (delete-before . :never) (font . frameset-filter-font-param) (foreground-color . frameset-filter-sanitize-color) (fullscreen . frameset-filter-shelve-param) (GUI:font . frameset-filter-unshelve-param) (GUI:fullscreen . frameset-filter-unshelve-param) (GUI:height . frameset-filter-unshelve-param) (GUI:width . frameset-filter-unshelve-param) (height . frameset-filter-shelve-param) (outer-window-id . :never) (parent-frame . :never) (parent-id . :never) (mouse-wheel-frame . :never) (tty . frameset-filter-tty-to-GUI) (tty-type . frameset-filter-tty-to-GUI) (width . frameset-filter-shelve-param) (window-id . :never) (window-system . :never)) frameset-session-filter-alist) "\ +(defvar frameset-persistent-filter-alist (nconc '((background-color . frameset-filter-sanitize-color) (buffer-list . :never) (buffer-predicate . :never) (buried-buffer-list . :never) (client . :never) (delete-before . :never) (font . frameset-filter-font-param) (foreground-color . frameset-filter-sanitize-color) (fullscreen . frameset-filter-shelve-param) (GUI:font . frameset-filter-unshelve-param) (GUI:fullscreen . frameset-filter-unshelve-param) (GUI:height . frameset-filter-unshelve-param) (GUI:width . frameset-filter-unshelve-param) (height . frameset-filter-shelve-param) (outer-window-id . :never) (parent-frame . :never) (parent-id . :never) (mouse-wheel-frame . :never) (tty . frameset-filter-tty-to-GUI) (tty-type . frameset-filter-tty-to-GUI) (width . frameset-filter-shelve-param) (window-id . :never) (window-system . :never)) frameset-session-filter-alist) "\ Parameters to filter for persistent framesets. DO NOT MODIFY. See `frameset-filter-alist' for a full description.") @@ -15227,7 +15294,9 @@ easily repeat a find command. Run grep, searching for REGEXP in FILES in directory DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in `grep-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. +entering `ch' is equivalent to `*.[ch]'. As whitespace triggers +completion when entering a pattern, including it requires +quoting, e.g. `\\[quoted-insert]'. With \\[universal-argument] prefix, you can edit the constructed shell command line before it is executed. @@ -15245,7 +15314,9 @@ This command shares argument histories with \\[rgrep] and \\[grep]. Recursively grep for REGEXP in FILES in directory tree rooted at DIR. The search is limited to file names matching shell pattern FILES. FILES may use abbreviations defined in `grep-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. +entering `ch' is equivalent to `*.[ch]'. As whitespace triggers +completion when entering a pattern, including it requires +quoting, e.g. `\\[quoted-insert]'. With \\[universal-argument] prefix, you can edit the constructed shell command line before it is executed. @@ -17375,7 +17446,7 @@ For details of keybindings, see `ido-find-file'. \(fn)" t nil) (autoload 'ido-find-alternate-file "ido" "\ -Switch to another file and show it in another window. +Find another file, select its buffer, kill previous buffer. The file name is selected interactively by typing a substring. For details of keybindings, see `ido-find-file'. @@ -24631,7 +24702,9 @@ Display the full documentation of PACKAGE (a symbol). Display a list of packages. This first fetches the updated list of packages before displaying, unless a prefix argument NO-FETCH is specified. -The list is displayed in a buffer named `*Packages*'. +The list is displayed in a buffer named `*Packages*', and +includes the package's version, availability status, and a +short description. \(fn &optional NO-FETCH)" t nil) @@ -25242,6 +25315,14 @@ Global menu used by PCL-CVS.") (put 'perl-brace-imaginary-offset 'safe-local-variable 'integerp) (put 'perl-label-offset 'safe-local-variable 'integerp) +(autoload 'perl-flymake "perl-mode" "\ +Perl backend for Flymake. Launches +`perl-flymake-command' (which see) and passes to its standard +input the contents of the current buffer. The output of this +command is analyzed for error and warning messages. + +\(fn REPORT-FN &rest ARGS)" nil nil) + (autoload 'perl-mode "perl-mode" "\ Major mode for editing Perl code. Expression and list commands understand all Perl brackets. @@ -26190,7 +26271,11 @@ is not a part of a detectable project either, return a (autoload 'project-find-regexp "project" "\ Find all matches for REGEXP in the current project's roots. With \\[universal-argument] prefix, you can specify the directory -to search in, and the file name pattern to search for. +to search in, and the file name pattern to search for. The +pattern may use abbreviations defined in `grep-files-aliases', +e.g. entering `ch' is equivalent to `*.[ch]'. As whitespace +triggers completion when entering a pattern, including it +requires quoting, e.g. `\\[quoted-insert]'. \(fn REGEXP)" t nil) @@ -34407,24 +34492,21 @@ This regexp should match Tramp file names but no other file names. When calling `tramp-register-file-name-handlers', the initial value is overwritten by the car of `tramp-file-name-structure'.") -(defconst tramp-autoload-file-name-regexp (concat "\\`/" (if (memq system-type '(cygwin windows-nt)) "\\(-\\|[^/|:]\\{2,\\}\\)" "[^/|:]+") ":\\'") "\ +(defconst tramp-autoload-file-name-regexp (concat "\\`/" (if (memq system-type '(cygwin windows-nt)) "\\(-\\|[^/|:]\\{2,\\}\\)" "[^/|:]+") ":") "\ Regular expression matching file names handled by Tramp autoload. It must match the initial `tramp-syntax' settings. It should not match file names at root of the underlying local file system, like \"/sys\" or \"/C:\".") (defun tramp-autoload-file-name-handler (operation &rest args) "\ -Load Tramp file name handler, and perform OPERATION." (let ((default-directory temporary-file-directory)) (load "tramp" (quote noerror) (quote nomessage))) (apply operation args)) +Load Tramp file name handler, and perform OPERATION." (if tramp-mode (let ((default-directory temporary-file-directory)) (load "tramp" (quote noerror) (quote nomessage))) (tramp-unload-file-name-handlers)) (apply operation args)) (defun tramp-register-autoload-file-name-handlers nil "\ Add Tramp file name handlers to `file-name-handler-alist' during autoload." (add-to-list (quote file-name-handler-alist) (cons tramp-autoload-file-name-regexp (quote tramp-autoload-file-name-handler))) (put (quote tramp-autoload-file-name-handler) (quote safe-magic) t)) + (tramp-register-autoload-file-name-handlers) -(tramp-register-autoload-file-name-handlers) - -(autoload 'tramp-unload-file-name-handlers "tramp" "\ -Unload Tramp file name handlers from `file-name-handler-alist'. - -\(fn)" nil nil) +(defun tramp-unload-file-name-handlers nil "\ +Unload Tramp file name handlers from `file-name-handler-alist'." (dolist (fnh (quote (tramp-file-name-handler tramp-completion-file-name-handler tramp-autoload-file-name-handler))) (let ((a1 (rassq fnh file-name-handler-alist))) (setq file-name-handler-alist (delq a1 file-name-handler-alist))))) (defvar tramp-completion-mode nil "\ If non-nil, external packages signal that they are in file name completion.") commit 8c8b6732882248df4ca3b687e0a4b4e5e4ab3777 Author: Eli Zaretskii Date: Fri Dec 1 12:40:26 2017 +0200 Fix backing up remote files in local directories on MS-Windows * lisp/files.el (make-backup-file-name-1): Support remote file names correctly when they are backed up into a local directory on MS-Windows and MS-DOS. (Bug#29440) diff --git a/lisp/files.el b/lisp/files.el index 8021e1bbed..9a79b2a0c7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4653,25 +4653,41 @@ The function `find-backup-file-name' also uses this." ;; "/drive_x". (or (file-name-absolute-p file) (setq file (expand-file-name file))) ; make defaults explicit - ;; Replace any invalid file-name characters (for the - ;; case of backing up remote files). - (setq file (expand-file-name (convert-standard-filename file))) - (if (eq (aref file 1) ?:) - (setq file (concat "/" - "drive_" - (char-to-string (downcase (aref file 0))) - (if (eq (aref file 2) ?/) - "" - "/") - (substring file 2))))) - ;; Make the name unique by substituting directory - ;; separators. It may not really be worth bothering about - ;; doubling `!'s in the original name... - (expand-file-name - (subst-char-in-string - ?/ ?! - (replace-regexp-in-string "!" "!!" file)) - backup-directory)) + (cond + ((file-remote-p file) + ;; Remove the leading slash, if any, to prevent + ;; expand-file-name from adding a drive letter. + (and (memq (aref file 0) '(?/ ?\\)) + (setq file (substring file 1))) + ;; Replace any invalid file-name characters. + (setq file (convert-standard-filename file)) + ;; Replace slashes to make the file name unique, and + ;; prepend backup-directory. + (expand-file-name + (subst-char-in-string + ?/ ?! + (replace-regexp-in-string "!" "!!" + (concat "/" file))) + backup-directory)) + (t + ;; Replace any invalid file-name characters. + (setq file (expand-file-name (convert-standard-filename file))) + (if (eq (aref file 1) ?:) + (setq file (concat "/" + "drive_" + (char-to-string (downcase (aref file 0))) + (if (eq (aref file 2) ?/) + "" + "/") + (substring file 2)))) + ;; Make the name unique by substituting directory + ;; separators. It may not really be worth bothering about + ;; doubling `!'s in the original name... + (expand-file-name + (subst-char-in-string + ?/ ?! + (replace-regexp-in-string "!" "!!" file)) + backup-directory))))) (expand-file-name (file-name-nondirectory file) (file-name-as-directory abs-backup-directory)))))) commit 8eb6870be690128fb1cbc012c55093813c39830c Author: Tak Kunihiro Date: Fri Dec 1 10:54:37 2017 +0200 Fix vertical cursor motion in pixel-scroll.el * lisp/pixel-scroll.el (pixel-scroll-up): Move cursor down regardless of whether EOB is shown at the top. (pixel-scroll-down) Move cursor up regardless of whether BOB is shown at the top. (Bug#29374) diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 9bfe5c91f5..f64a4392b4 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -110,11 +110,11 @@ This is an alternative of `scroll-up'. Scope moves downward." pixel-resolution-fine-flag (frame-char-height)) (pixel-line-height)))) - (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close - (scroll-up 1) ; relay on robust method - (while (pixel-point-at-top-p amt) ; prevent too late (multi tries) - (vertical-motion 1)) ; move point downward - (pixel-scroll-pixel-up amt))))) ; move scope downward + (while (pixel-point-at-top-p amt) ; prevent too late (multi tries) + (vertical-motion 1)) ; move point downward + (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close + (scroll-up 1) ; relay on robust method + (pixel-scroll-pixel-up amt))))) ; move scope downward (defun pixel-scroll-down (&optional arg) "Scroll text of selected window down ARG lines. @@ -127,11 +127,11 @@ This is and alternative of `scroll-down'. Scope moves upward." pixel-resolution-fine-flag (frame-char-height)) (pixel-line-height -1)))) - (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen - (pixel-eob-at-top-p)) ; for file with a long line - (scroll-down 1) ; relay on robust method - (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries) - (vertical-motion -1)) + (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries) + (vertical-motion -1)) ; move point upward + (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen + (pixel-eob-at-top-p)) ; for file with a long line + (scroll-down 1) ; relay on robust method (pixel-scroll-pixel-down amt))))) (defun pixel-bob-at-top-p (amt) commit 625e84f15634e10a79a0f053e44145ce75930fd1 Author: Basil L. Contovounesios Date: Fri Dec 1 10:49:57 2017 +0200 Fix typos in doc strings of message.el * lisp/gnus/message.el (message-header-to) (message-header-subject, message-header-newsgroups) (message-header-other): Fix typos in doc strings. (Bug#29405) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 22de7fee81..fa5f47be30 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1434,7 +1434,7 @@ starting with `not' and followed by regexps." (:foreground "MidnightBlue" :bold t)) (t (:bold t :italic t))) - "Face used for displaying From headers." + "Face used for displaying To headers." :group 'message-faces) ;; backward-compatibility alias (put 'message-header-to-face 'face-alias 'message-header-to) @@ -1464,7 +1464,7 @@ starting with `not' and followed by regexps." (:foreground "navy blue" :bold t)) (t (:bold t))) - "Face used for displaying subject headers." + "Face used for displaying Subject headers." :group 'message-faces) ;; backward-compatibility alias (put 'message-header-subject-face 'face-alias 'message-header-subject) @@ -1479,7 +1479,7 @@ starting with `not' and followed by regexps." (:foreground "blue4" :bold t :italic t)) (t (:bold t :italic t))) - "Face used for displaying newsgroups headers." + "Face used for displaying Newsgroups headers." :group 'message-faces) ;; backward-compatibility alias (put 'message-header-newsgroups-face 'face-alias 'message-header-newsgroups) @@ -1494,7 +1494,7 @@ starting with `not' and followed by regexps." (:foreground "steel blue")) (t (:bold t :italic t))) - "Face used for displaying newsgroups headers." + "Face used for displaying other headers." :group 'message-faces) ;; backward-compatibility alias (put 'message-header-other-face 'face-alias 'message-header-other) commit 9292276a444bb3a150f563fd2564319f260aa43d Author: Eli Zaretskii Date: Fri Dec 1 10:26:58 2017 +0200 Fix a typo in the Emacs manual * doc/emacs/abbrevs.texi (Abbrev Concepts): Fix a typo. Reported by clemens.radermacher@posteo.de in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index 117d07e281..5f400a2399 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi @@ -62,8 +62,8 @@ definition for the current major mode overrides a global definition. You can define abbrevs interactively during the editing session, irrespective of whether Abbrev mode is enabled. You can also save -lists of abbrev definitions in files, which you can the reload for use -in later sessions. +lists of abbrev definitions in files, which you can then reload for +use in later sessions. @node Defining Abbrevs @section Defining Abbrevs commit 42509c064910073a4d7ad2b9c7e17bbd7b30ac9b Author: Eli Zaretskii Date: Fri Dec 1 10:20:47 2017 +0200 Improve the documentation of 'table-insert-sequence' * doc/emacs/text.texi (Table Misc): Fix the description of 'table-insert-sequence'. Reported by jack in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index bb2fbc51be..2f6ebed026 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -2807,9 +2807,14 @@ high, the table is 67 characters wide and 16 lines high with 2 columns and 3 rows, and a total of 5 cells. @findex table-insert-sequence - @kbd{M-x table-insert-sequence} inserts a string into each cell. -Each string is a part of a sequence i.e., a series of increasing -integer numbers. + @kbd{M-x table-insert-sequence} traverses the cells of a table +inserting a sequence of text strings into each cell as it goes. It +asks for the base string of the sequence, and then produces the +sequence by ``incrementing'' the base string, either numerically (if +the base string ends in numerical characters) or in the +@acronym{ASCII} order. In addition to the base string, the command +prompts for the number of elements in the sequence, the increment, the +cell interval, and the justification of the text in each cell. @cindex table for HTML and LaTeX @findex table-generate-source commit 93dc7ae4a419e444e1a0daa4686552fdab7f3357 Author: Paul Eggert Date: Thu Nov 30 15:22:46 2017 -0800 Port better to QNX Problem reported by Elad Lahav on emacs-devel. * configure.ac: On QNX, default CC to qcc (a GCC wrapper), and default LDFLAGS to -N2MB so that the initial stack size is not too small. Also, fix misspelling of ‘qnxnto’. diff --git a/configure.ac b/configure.ac index f1ca7cc81b..2df5679f1d 100644 --- a/configure.ac +++ b/configure.ac @@ -702,7 +702,9 @@ case "${canonical}" in ## QNX Neutrino *-nto-qnx* ) opsys=qnxnto + test -z "$CC" && CC=qcc CFLAGS="$CFLAGS -D__NO_EXT_QNX" + LDFLAGS="-N2MB $LDFLAGS" ;; ## Intel 386 machines where we don't care about the manufacturer. @@ -2218,7 +2220,7 @@ test "$CANNOT_DUMP" = yes || case "$opsys" in ## darwin ld insists on the use of malloc routines in the System framework. darwin | mingw32 | nacl | sol2-10) ;; - cygwin | qnxto | freebsd) + cygwin | qnxnto | freebsd) hybrid_malloc=yes system_malloc= ;; *) test "$ac_cv_func_sbrk" = yes && system_malloc=$emacs_cv_sanitize_address;; commit ad99550610542f8333dc964b3bef2b9e6ad7b0f6 Author: Michael Albinus Date: Thu Nov 30 20:31:33 2017 +0100 Make tramp-test42-auto-load more robust * test/lisp/net/tramp-tests.el (tramp-test42-auto-load): Make it more robust. Don't skip. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 8a551db778..b0fe3f83e9 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4613,15 +4613,13 @@ process sentinels. They shall not disturb each other." (ignore-errors (cancel-timer timer)) (ignore-errors (delete-directory tmp-name 'recursive)))))) +;; This test is inspired by Bug#29163. (ert-deftest tramp-test42-auto-load () "Check that Tramp autoloads properly." - (skip-unless (tramp--test-enabled)) - (skip-unless (not (tramp--test-mock-p))) - (let ((default-directory (expand-file-name temporary-file-directory)) (code (format - "(message \"Tramp loaded: %%s\" (consp (file-attributes %S)))" + "(message \"Tramp loaded: %%s\" (and (file-remote-p %S) t))" tramp-test-temporary-file-directory))) (should (string-match commit af0ce33d08a0761455418918c88feda20df9c668 Author: Eli Zaretskii Date: Thu Nov 30 19:58:02 2017 +0200 ; * lisp/composite.el (find-composition): Fix a typo in last change. diff --git a/lisp/composite.el b/lisp/composite.el index f7e0c4a091..7293d7c15c 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -338,7 +338,7 @@ chunk of text that is automatically composed. If such a chunk is found closer to POS than the position that has `composition' property, the value is a list of FROM, TO, and a glyph-string that specifies how the chunk is to be composed; DETAIL-P is -inored this case. See the function `composition-get-gstring' +inored in this case. See the function `composition-get-gstring' for the format of the glyph-string." (let ((result (find-composition-internal pos limit string detail-p))) (if (and detail-p (> (length result) 3) (nth 2 result) (not (nth 3 result))) commit bdbcdbac431d672915c92fc77dbf7326f338cecb Author: Eli Zaretskii Date: Thu Nov 30 19:55:41 2017 +0200 Avoid assertions in find-composition * src/font.c (font_range): If called with STRING non-nil and FACE a NULL pointer, compute face by calling face_at_string_position. (Bug#29506) * lisp/composite.el (find-composition): Doc fix. diff --git a/lisp/composite.el b/lisp/composite.el index 72b0ffc8f4..f7e0c4a091 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -337,8 +337,9 @@ When Automatic Composition mode is on, this function also finds a chunk of text that is automatically composed. If such a chunk is found closer to POS than the position that has `composition' property, the value is a list of FROM, TO, and a glyph-string -that specifies how the chunk is to be composed. See the function -`composition-get-gstring' for the format of the glyph-string." +that specifies how the chunk is to be composed; DETAIL-P is +inored this case. See the function `composition-get-gstring' +for the format of the glyph-string." (let ((result (find-composition-internal pos limit string detail-p))) (if (and detail-p (> (length result) 3) (nth 2 result) (not (nth 3 result))) ;; This is a valid rule-base composition. diff --git a/src/font.c b/src/font.c index f7cebdce78..441652b095 100644 --- a/src/font.c +++ b/src/font.c @@ -3794,19 +3794,26 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit, int c; Lisp_Object font_object = Qnil; - if (NILP (string)) + if (!face) { - if (! face) + struct frame *f = XFRAME (w->frame); + int face_id; + + if (NILP (string)) + face_id = face_at_buffer_position (w, pos, &ignore, *limit, + false, -1); + else { - int face_id; + face_id = + NILP (Vface_remapping_alist) + ? DEFAULT_FACE_ID + : lookup_basic_face (f, DEFAULT_FACE_ID); - face_id = face_at_buffer_position (w, pos, &ignore, - *limit, false, -1); - face = FACE_FROM_ID (XFRAME (w->frame), face_id); + face_id = face_at_string_position (w, string, pos, 0, &ignore, + face_id, false); } + face = FACE_FROM_ID (f, face_id); } - else - eassert (face); while (pos < *limit) {