From 005ac7c28b0eb16a0b4690feeb1a4918465e83e7 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 17 Mar 2016 09:04:51 -0700 Subject: [PATCH 01/15] * lisp/mail/rmail.el (rmail-mime-entity-truncated): Declare. --- lisp/mail/rmail.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 70b0f232ce6..10ba5b38031 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4582,6 +4582,8 @@ Argument MIME is non-nil if this is a mime message." (list armor-start (- (point-max) after-end) mime armor-end-regexp))) +(declare-function rmail-mime-entity-truncated "rmailmm" (entity)) + ;; Should this have a key-binding, or be in a menu? ;; There doesn't really seem to be an appropriate menu. ;; Eg the edit command is not in a menu either. From cbedfc26584fdffebedb713775ce5f97576ca75b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 17 Mar 2016 12:52:11 -0400 Subject: [PATCH 02/15] * lisp/gnus/mm-decode.el (gnus-format-message): Autoload it. ; Do not merge to master. --- lisp/gnus/mm-decode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index f70877dc63a..3ea63c74034 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -30,6 +30,7 @@ (autoload 'gnus-map-function "gnus-util") (autoload 'gnus-replace-in-string "gnus-util") (autoload 'gnus-read-shell-command "gnus-util") +(autoload 'gnus-format-message "gnus-util") (autoload 'mm-inline-partial "mm-partial") (autoload 'mm-inline-external-body "mm-extern") From 9094304a9c109495bf2212a713df1b07270d15cd Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 17 Mar 2016 12:55:09 -0400 Subject: [PATCH 03/15] * lisp/progmodes/xref.el (xref-buffer-name, xref--window): Move definitions before use. --- lisp/progmodes/xref.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 69e6a154ae5..feed0fb36d9 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -436,6 +436,8 @@ If SELECT is non-nil, select the target window." ;;; XREF buffer (part of the UI) ;; The xref buffer is used to display a set of xrefs. +(defconst xref-buffer-name "*xref*" + "The name of the buffer to show xrefs.") (defmacro xref--with-dedicated-window (&rest body) `(let* ((xref-w (get-buffer-window xref-buffer-name)) @@ -470,6 +472,9 @@ If SELECT is non-nil, select the target window." (xref--show-pos-in-buf marker buf select)) (user-error (message (error-message-string err))))) +(defvar-local xref--window nil + "The original window this xref buffer was created from.") + (defun xref-show-location-at-point () "Display the source of xref at point in the appropriate window, if any." (interactive) @@ -500,9 +505,6 @@ If SELECT is non-nil, select the target window." (back-to-indentation) (get-text-property (point) 'xref-item))) -(defvar-local xref--window nil - "The original window this xref buffer was created from.") - (defun xref-goto-xref () "Jump to the xref on the current line and select its window." (interactive) @@ -624,9 +626,6 @@ references displayed in the current *xref* buffer." (t (error "No %s xref" (if backward "previous" "next")))))) -(defconst xref-buffer-name "*xref*" - "The name of the buffer to show xrefs.") - (defvar xref--button-map (let ((map (make-sparse-keymap))) (define-key map [(control ?m)] #'xref-goto-xref) From dca240a70dcb1456a079a4738ac8e04c6698fc78 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 17 Mar 2016 20:33:51 +0100 Subject: [PATCH 04/15] Suppress some Tramp tests for OSX, do not merge with master * test/automated/tramp-tests.el (tramp--test-darwin-p): New defun. (tramp--test-utf8): Use it. (Bug#22145) --- test/automated/tramp-tests.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index a29e42e7343..d9563ec9174 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el @@ -1785,6 +1785,14 @@ Several special characters do not work properly there." (file-truename tramp-test-temporary-file-directory) nil (string-match "^HP-UX" (tramp-get-connection-property v "uname" "")))) +(defun tramp--test-darwin-p () + "Check, whether the remote host runs Mac OS X. +Several special characters do not work properly there." + ;; We must refill the cache. `file-truename' does it. + (with-parsed-tramp-file-name + (file-truename tramp-test-temporary-file-directory) nil + (string-match "^Darwin" (tramp-get-connection-property v "uname" "")))) + (defun tramp--test-check-files (&rest files) "Run a simple but comprehensive test over every file in FILES." ;; We must use `file-truename' for the temporary directory, because @@ -2038,9 +2046,10 @@ Use the `ls' command." (file-name-coding-system 'utf-8)) (tramp--test-check-files (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") - (unless (tramp--test-hpux-p) + (unless (or (tramp--test-hpux-p) (tramp--test-darwin-p)) "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت") - "银河系漫游指南系列" + (unless (tramp--test-darwin-p) + "银河系漫游指南系列") "Автостопом по гала́ктике"))) (ert-deftest tramp-test32-utf8 () From 1df7173eb23510ef5faabede04a487955aec2917 Mon Sep 17 00:00:00 2001 From: Anders Lindgren Date: Thu, 17 Mar 2016 21:07:04 +0100 Subject: [PATCH 05/15] Avoid screen artifacts with new OS X visible bell after scrolling * src/nsterm.m (EmacsBell): Save NSView when displaying the visible bell and set `needsDisplay' when removed. (hide_bell): Trace. (ns_copy_bits): Trace. --- src/nsterm.m | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index 38aa4a3a413..b796193af77 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1172,10 +1172,31 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen) ========================================================================== */ +// This bell implementation shows the visual bell image asynchronously +// from the rest of Emacs. This is done by adding a NSView to the +// superview of the Emacs window and removing it using a timer. +// +// Unfortunately, some Emacs operations, like scrolling, is done using +// low-level primitives that copy the content of the window, including +// the bell image. To some extent, this is handled by removing the +// image prior to scrolling and marking that the window is in need for +// redisplay. +// +// To test this code, make sure that there is no artifacts of the bell +// image in the following situations. Use a non-empty buffer (like the +// tutorial) to ensure that a scroll is performed: +// +// * Single-window: C-g C-v +// +// * Side-by-windows: C-x 3 C-g C-v +// +// * Windows above each other: C-x 2 C-g C-v + @interface EmacsBell : NSImageView { // Number of currently active bell:s. unsigned int nestCount; + NSView * mView; bool isAttached; } - (void)show:(NSView *)view; @@ -1204,7 +1225,6 @@ - (id)init; [self.image unlockFocus]; #else self.image = [NSImage imageNamed:NSImageNameCaution]; - [self.image setScalesWhenResized:YES]; [self.image setSize:NSMakeSize(self.image.size.width * 5, self.image.size.height * 5)]; #endif @@ -1229,6 +1249,7 @@ - (void)show:(NSView *)view [self setFrameSize:self.image.size]; isAttached = true; + mView = view; [[[view window] contentView] addSubview:self positioned:NSWindowAbove relativeTo:nil]; @@ -1258,9 +1279,12 @@ - (void)hide -(void)remove { + NSTRACE ("[EmacsBell remove]"); if (isAttached) { + NSTRACE_MSG ("removeFromSuperview"); [self removeFromSuperview]; + mView.needsDisplay = YES; isAttached = false; } } @@ -1310,6 +1334,8 @@ static void hide_bell () Ensure the bell is hidden. -------------------------------------------------------------------------- */ { + NSTRACE ("hide_bell"); + if (bell_view != nil) { [bell_view remove]; @@ -2392,6 +2418,8 @@ static void hide_bell () static void ns_copy_bits (struct frame *f, NSRect src, NSRect dest) { + NSTRACE ("ns_copy_bits"); + if (FRAME_NS_VIEW (f)) { hide_bell(); // Ensure the bell image isn't scrolled. From 658aa2dae8093fede8c823090c67e02756dd6ed5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2016 23:45:02 -0700 Subject: [PATCH 06/15] Port to GTK with strict C99 compiler * src/emacsgtkfixed.c: Use workaround for GNOME bug 683906 only in glib 2.35.6 and earlier, since the bug is fixed in 2.35.7. * src/emacsgtkfixed.c (EmacsFixedPrivate): * src/emacsgtkfixed.h (EmacsFixedClass): Remove duplicate typedef, which strict C99 does not allow (Bug#23003). --- src/emacsgtkfixed.c | 3 +-- src/emacsgtkfixed.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index cebd7b613c7..ca0bbfbb866 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c @@ -27,13 +27,12 @@ along with GNU Emacs. If not, see . */ #include "emacsgtkfixed.h" /* Silence a bogus diagnostic; see GNOME bug 683906. */ -#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) +#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) && ! GLIB_CHECK_VERSION (2, 35, 7) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wunused-local-typedefs" #endif typedef struct _EmacsFixed EmacsFixed; -typedef struct _EmacsFixedPrivate EmacsFixedPrivate; typedef struct _EmacsFixedClass EmacsFixedClass; struct _EmacsFixedPrivate diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h index 3d6a76ab570..0d09525e02a 100644 --- a/src/emacsgtkfixed.h +++ b/src/emacsgtkfixed.h @@ -30,7 +30,6 @@ G_BEGIN_DECLS struct frame; typedef struct _EmacsFixedPrivate EmacsFixedPrivate; -typedef struct _EmacsFixedClass EmacsFixedClass; struct _EmacsFixed { From de7601f149a5fedc1f3f62c62ba94b9d0e3d2069 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2016 08:36:59 -0700 Subject: [PATCH 07/15] Port to GTK with strict C11 compiler * src/gtkutil.c (xg_create_frame_widgets, xg_toggle_notify_cb): Cast from function type to void * where the C standard requires this. This works around a problem in the prototypes for g_signal_handler_find and g_signal_handlers_block_by_func, which use gpointer instead of GCallback. Found by using gcc -pedantic. --- src/gtkutil.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index 7dca5851f29..ba059b73a70 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1300,7 +1300,7 @@ xg_create_frame_widgets (struct frame *f) if (! g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC, 0, 0, 0, - G_CALLBACK (style_changed_cb), + (gpointer) G_CALLBACK (style_changed_cb), 0)) { g_signal_connect (G_OBJECT (gs), "notify::gtk-theme-name", @@ -1832,14 +1832,10 @@ xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data) if (!!visible != !!toggle_on) { - g_signal_handlers_block_by_func (G_OBJECT (wtoggle), - G_CALLBACK (xg_toggle_visibility_cb), - gobject); + gpointer cb = (gpointer) G_CALLBACK (xg_toggle_visibility_cb); + g_signal_handlers_block_by_func (G_OBJECT (wtoggle), cb, gobject); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), visible); - g_signal_handlers_unblock_by_func - (G_OBJECT (wtoggle), - G_CALLBACK (xg_toggle_visibility_cb), - gobject); + g_signal_handlers_unblock_by_func (G_OBJECT (wtoggle), cb, gobject); } x_gtk_show_hidden_files = visible; } From 6da3a6dc9e3e9ac3d7bb666410926ebc4a078505 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2016 08:42:15 -0700 Subject: [PATCH 08/15] Port to strict C99 offsetof * src/bidi.c (bidi_copy_it): * src/lisp.h (CHAR_TABLE_EXTRA_SLOTS): Use only a single identifier as the second argument of offsetof. Found by using clang -pedantic. --- src/bidi.c | 2 +- src/lisp.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bidi.c b/src/bidi.c index a68ffdb7e6d..c23ff954356 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -532,7 +532,7 @@ bidi_copy_it (struct bidi_it *to, struct bidi_it *from) /* Copy everything from the start through the active part of the level stack. */ memcpy (to, from, - (offsetof (struct bidi_it, level_stack[1]) + (offsetof (struct bidi_it, level_stack) + sizeof from->level_stack[0] + from->stack_idx * sizeof from->level_stack[0])); } diff --git a/src/lisp.h b/src/lisp.h index 27588848c29..6a98adbda9c 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1766,7 +1766,8 @@ CHAR_TABLE_EXTRA_SLOTS (struct Lisp_Char_Table *ct) /* Make sure that sub char-table contents slot is where we think it is. */ verify (offsetof (struct Lisp_Sub_Char_Table, contents) - == offsetof (struct Lisp_Vector, contents[SUB_CHAR_TABLE_OFFSET])); + == (offsetof (struct Lisp_Vector, contents) + + SUB_CHAR_TABLE_OFFSET * sizeof (Lisp_Object))); /*********************************************************************** Symbols From ed909c049e845a22a7beb626ac98f139388005fa Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2016 08:54:49 -0700 Subject: [PATCH 09/15] ; Spelling fixes --- lisp/forms.el | 2 +- lisp/progmodes/cc-defs.el | 2 +- src/floatfns.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/forms.el b/lisp/forms.el index c0b48fd3b63..b068352e6eb 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -593,7 +593,7 @@ Commands: Equivalent keys in read-only mode: ;; set-visited-file-name from calling set-auto-mode, which ;; might kill all local variables and set forms-file nil, ;; which will then barf in find-file-noselect below. This can - ;; hapen when the user sets the default major mode that is + ;; happen when the user sets the default major mode that is ;; different from the Fundamental mode. (let (change-major-mode-with-file-name) (set-visited-file-name nil)) diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 3b9f44e55a0..f458904c87a 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -1407,7 +1407,7 @@ been put there by c-put-char-property. POINT remains unchanged." (c-state-cache-good-pos c-state-cache-good-pos) ;(c-state-nonlit-pos-cache (copy-tree c-state-nonlit-pos-cache)) ;(c-state-nonlit-pos-cache-limit c-state-nonlit-pos-cache-limit) - ;(c-state-semi-nonlit-pos-cache (copy-treec c-state-semi-nonlit-pos-cache)) + ;(c-state-semi-nonlit-pos-cache (copy-tree c-state-semi-nonlit-pos-cache)) ;(c-state-semi-nonlit-pos-cache-limit c-state-semi-nonlit-pos-cache) (c-state-brace-pair-desert (copy-tree c-state-brace-pair-desert)) (c-state-point-min c-state-point-min) diff --git a/src/floatfns.c b/src/floatfns.c index b9af03b3431..c1bd25877e3 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -3,8 +3,7 @@ Copyright (C) 1988, 1993-1994, 1999, 2001-2016 Free Software Foundation, Inc. -Author: Wolfgang Rupprecht (ac -ording to ack.texi) +Author: Wolfgang Rupprecht (according to ack.texi) This file is part of GNU Emacs. From cd950da9dbbe05fd4cd62557943fedb6b34723f3 Mon Sep 17 00:00:00 2001 From: Marcin Borkowski Date: Mon, 14 Mar 2016 11:15:10 +0100 Subject: [PATCH 10/15] Honor prefix arg in doc-view-next-line-or-next-page * lisp/doc-view.el (doc-view-next-line-or-next-page): Take the prefix argument into consideration when continuous scrolling is not in effect (i.e., by default) (bug#19559). --- lisp/doc-view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 9d912c3f6d9..223565cedb6 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -626,7 +626,7 @@ at the bottom edge of the page moves to the next page." (image-bob) (image-bol 1)) (set-window-hscroll (selected-window) hscroll))) - (image-next-line 1))) + (image-next-line arg))) (defun doc-view-previous-line-or-previous-page (&optional arg) "Scroll downward by ARG lines if possible, else goto previous page. From 413e73b5dbce8dc89f2c3b9f4f1441fdf931c77d Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Fri, 18 Mar 2016 23:29:58 +0100 Subject: [PATCH 11/15] ; Small theme additions --- etc/themes/tsdh-light-theme.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index 422b26c8ebf..9d618c5e501 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -25,9 +25,8 @@ Used and created by Tassilo Horn.") (custom-theme-set-faces 'tsdh-light - '(Info-quoted ((t (:weight bold)))) - '(ace-jump-face-foreground ((t (:foreground "DeepPink" :box nil :weight bold)))) - '(aw-leading-char-face ((t (:inherit ace-jump-face-foreground)))) + '(Info-quoted ((t (:underline "gray40" :weight bold)))) + '(aw-leading-char-face ((t (:background "red" :foreground "white" :weight bold)))) '(default ((t (:background "white" :foreground "black")))) '(diff-added ((t (:inherit diff-changed :background "light green")))) '(diff-changed ((t (:background "light steel blue")))) @@ -36,6 +35,8 @@ Used and created by Tassilo Horn.") '(diff-indicator-removed ((t (:inherit diff-indicator-changed)))) '(diff-removed ((t (:inherit diff-changed :background "sandy brown")))) '(dired-directory ((t (:inherit font-lock-function-name-face :weight bold)))) + '(font-lock-regexp-grouping-backslash ((t (:inherit bold :foreground "black")))) + '(font-lock-regexp-grouping-construct ((t (:inherit bold :foreground "black")))) '(gnus-button ((t (:inherit button)))) '(gnus-header-name ((t (:box (:line-width 1 :style released-button) :weight bold)))) '(gnus-group-mail-1 ((t (:inherit gnus-group-mail-1-empty :weight bold)))) From 26f9c5075ff273013418a66b70fae477301d41d5 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 19 Mar 2016 00:37:09 +0200 Subject: [PATCH 12/15] Fixup the "normal" matcher; highlight global var symbols, too * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight operator name symbols with the "normal" matcher (it actually needed updating). Highlight global variable symbols, too. --- lisp/progmodes/ruby-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 2389f742937..972bf99145e 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2173,7 +2173,7 @@ See `font-lock-syntax-table'.") 'font-lock-string-face))) ;; Perl-ish keywords. "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" - ;; Variables. + ;; Singleton objects. (,(concat ruby-font-lock-keyword-beg-re "\\_<\\(nil\\|true\\|false\\)\\_>") 1 font-lock-constant-face) @@ -2181,7 +2181,7 @@ See `font-lock-syntax-table'.") ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" (0 font-lock-builtin-face)) ;; Symbols. - ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?" + ("\\(^\\|[^:]\\)\\(:@\\{0,2\\}\\(?:\\sw\\|\\s_\\)+\\)" (2 font-lock-constant-face) (3 (unless (and (eq (char-before (match-end 3)) ?=) (eq (char-after (match-end 3)) ?>)) From dd2737b375d1eb3d7e0acbb9544fc8c85403d65e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Mar 2016 13:05:55 +0200 Subject: [PATCH 13/15] Adjudicate review comments in abbrevs.texi * doc/lispref/abbrevs.texi (Abbrev Files, Abbrev Expansion): * doc/emacs/abbrevs.texi (Dabbrev Customization): State the default values of variables. Suggested by Steve Byrne . (Bug#23016) * admin/release-process (Check manuals): Mark files reviewed by Steve Byrne. --- admin/release-process | 4 ++-- doc/emacs/abbrevs.texi | 9 +++++---- doc/lispref/abbrevs.texi | 9 ++++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/admin/release-process b/admin/release-process index 2f23dac9b7f..3f75ff52ca4 100644 --- a/admin/release-process +++ b/admin/release-process @@ -237,7 +237,7 @@ TUTORIAL.zh ** Check the manual. -abbrevs.texi +abbrevs.texi Steve Byrne ack.texi anti.texi arevert-xtra.texi @@ -292,7 +292,7 @@ xresources.texi ** Check the Lisp manual. -abbrevs.texi +abbrevs.texi Steve Byrne anti.texi back.texi backups.texi diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index e0441a1984d..a1db34cf0ee 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi @@ -435,9 +435,9 @@ copies the expansion verbatim including its case pattern. controls which characters are considered part of a word, for dynamic expansion purposes. The regular expression must match just one character, never two or more. The same regular expression also determines which -characters are part of an expansion. The value @code{nil} has a special -meaning: dynamic abbrevs are made of word characters, but expansions are -made of word and symbol characters. +characters are part of an expansion. The (default) value @code{nil} +has a special meaning: dynamic abbrevs are made of word characters, +but expansions are made of word and symbol characters. @vindex dabbrev-abbrev-skip-leading-regexp In shell scripts and makefiles, a variable name is sometimes prefixed @@ -445,4 +445,5 @@ with @samp{$} and sometimes not. Major modes for this kind of text can customize dynamic abbrev expansion to handle optional prefixes by setting the variable @code{dabbrev-abbrev-skip-leading-regexp}. Its value should be a regular expression that matches the optional prefix that -dynamic abbrev expression should ignore. +dynamic abbrev expression should ignore. The default is @code{nil}, +which means no characters should be skipped. diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi index 5f5a395c97a..cdea2a8b3c8 100644 --- a/doc/lispref/abbrevs.texi +++ b/doc/lispref/abbrevs.texi @@ -198,7 +198,10 @@ abbrevs in a file automatically, under the control of variables described here. @defopt abbrev-file-name -This is the default file name for reading and saving abbrevs. +This is the default file name for reading and saving abbrevs. By +default, Emacs will look for @file{~/.emacs.d/abbrev_defs}, and, if +not found, for @file{~/.abbrev_defs}; if neither file exists, Emacs +will create @file{~/.emacs.d/abbrev_defs}. @end defopt @defun quietly-read-abbrev-file &optional filename @@ -216,7 +219,7 @@ A non-@code{nil} value for @code{save-abbrevs} means that Emacs should offer to save abbrevs (if any have changed) when files are saved. If the value is @code{silently}, Emacs saves the abbrevs without asking the user. @code{abbrev-file-name} specifies the file to save the -abbrevs in. +abbrevs in. The default value is @code{t}. @end defopt @defvar abbrevs-changed @@ -282,7 +285,7 @@ omitted, it defaults to point. @code{name}, if non-@code{nil}, should be the name by which this abbrev was found (a string); it is used to figure out whether to adjust the capitalization of the expansion. The function returns @code{abbrev} if the abbrev was successfully -inserted. +inserted, otherwise it returns @code{nil}. @end defun @deffn Command abbrev-prefix-mark &optional arg From fc3cd53900eb5e80b91b6d2615b3800fd2f59c16 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 19 Mar 2016 16:51:46 +0100 Subject: [PATCH 14/15] Fix Bug#23032 * doc/misc/eshell.texi (Arguments): Mention the pipe symbol in remote file names. (Bug#23032) --- doc/misc/eshell.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index f90c7d3e8fb..a7a3840aa5f 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -252,7 +252,9 @@ need to use a function that takes some other data type, you will need to call it in an Elisp expression (which can also be used with @ref{Expansion, expansions}). As with other shells, you can escape special characters and spaces with the backslash (@code{\}) and -apostrophes (@code{''}) and double quotes (@code{""}). +apostrophes (@code{''}) and double quotes (@code{""}). This is needed +especially for file names with special characters like pipe +(@code{|}), which could be part of remote file names. @node Built-ins From b8ea08b037fb16395b90481162587706e71b487c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Mar 2016 21:32:27 +0200 Subject: [PATCH 15/15] Avoid errors in 'newline' * lisp/simple.el (newline): Don't barf if invoked with non-positive argument in the middle of a line. (Bug#22490) --- lisp/simple.el | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 84a1919bc01..2a81ee745cb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -408,15 +408,19 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'." (last-command-event ?\n) ;; Don't auto-fill if we have a numeric argument. (auto-fill-function (if arg nil auto-fill-function)) + (arg (prefix-numeric-value arg)) (postproc ;; Do the rest in post-self-insert-hook, because we want to do it ;; *before* other functions on that hook. (lambda () - (cl-assert (eq ?\n (char-before))) + ;; We are not going to insert any newlines if arg is + ;; non-positive. + (or (and (numberp arg) (<= arg 0)) + (cl-assert (eq ?\n (char-before)))) ;; Mark the newline(s) `hard'. (if use-hard-newlines (set-hard-newline-properties - (- (point) (prefix-numeric-value arg)) (point))) + (- (point) arg) (point))) ;; If the newline leaves the previous line blank, and we ;; have a left margin, delete that from the blank line. (save-excursion @@ -433,19 +437,21 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'." (move-to-left-margin nil t))))) (unwind-protect (if (not interactive) - ;; FIXME: For non-interactive uses, many calls actually just want - ;; (insert "\n"), so maybe we should do just that, so as to avoid - ;; the risk of filling or running abbrevs unexpectedly. - (let ((post-self-insert-hook (list postproc))) - (self-insert-command (prefix-numeric-value arg))) - (unwind-protect - (progn - (add-hook 'post-self-insert-hook postproc nil t) - (self-insert-command (prefix-numeric-value arg))) - ;; We first used let-binding to protect the hook, but that was naive - ;; since add-hook affects the symbol-default value of the variable, - ;; whereas the let-binding might only protect the buffer-local value. - (remove-hook 'post-self-insert-hook postproc t))) + ;; FIXME: For non-interactive uses, many calls actually + ;; just want (insert "\n"), so maybe we should do just + ;; that, so as to avoid the risk of filling or running + ;; abbrevs unexpectedly. + (let ((post-self-insert-hook (list postproc))) + (self-insert-command arg)) + (unwind-protect + (progn + (add-hook 'post-self-insert-hook postproc nil t) + (self-insert-command arg)) + ;; We first used let-binding to protect the hook, but that + ;; was naive since add-hook affects the symbol-default + ;; value of the variable, whereas the let-binding might + ;; only protect the buffer-local value. + (remove-hook 'post-self-insert-hook postproc t))) (cl-assert (not (member postproc post-self-insert-hook))) (cl-assert (not (member postproc (default-value 'post-self-insert-hook)))))) nil)