emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b5474ba 5/5: Merge from origin/emacs-27


From: Glenn Morris
Subject: master b5474ba 5/5: Merge from origin/emacs-27
Date: Wed, 4 Mar 2020 17:03:18 -0500 (EST)

branch: master
commit b5474ba1607fdca620cdee40a11cc0120697fc58
Merge: 79f1965 a3c2d18
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-27
    
    a3c2d186eb (origin/emacs-27) CC Mode: Fix the handling of two adjacen...
    a1abf73c76 Fix combine-change-calls-1 for when buffer-undo-list is t
    db37dd2e84 Don't misinterpret doc string as initial value
    40b217c2bf Bump checkdoc-version to match library header
    60418a1ab2 Explain how to unset mode bindings (Bug#39802)
    7cafbbe964 Fix describe-variable on values with circular syntax (Bug#...
    592b1cfee9 Improve documentation of next-error-highlight-no-select (b...
---
 doc/emacs/building.texi     |  5 ++++-
 doc/emacs/custom.texi       | 17 +++++++++++------
 lisp/emacs-lisp/checkdoc.el |  2 +-
 lisp/help-fns.el            |  2 ++
 lisp/loadhist.el            |  2 +-
 lisp/progmodes/cc-mode.el   | 13 ++++++-------
 lisp/progmodes/vhdl-mode.el |  2 +-
 lisp/simple.el              | 13 +++++++++----
 lisp/subr.el                | 25 ++++++++++++-------------
 9 files changed, 47 insertions(+), 34 deletions(-)

diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 272b08d..38963f2 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -214,6 +214,7 @@ Select a buffer to be used by next invocation of 
@code{next-error} and
 @kindex C-x `
 @findex next-error
 @vindex next-error-highlight
+@vindex next-error-highlight-no-select
   To visit errors sequentially, type @w{@kbd{C-x `}}
 (@code{next-error}), or equivalently @kbd{M-g M-n} or @kbd{M-g n}.
 This command can be invoked from any buffer, not just a Compilation
@@ -258,7 +259,9 @@ to skip any messages.
 
   When Emacs visits the locus of an error message, it momentarily
 highlights the relevant source line.  The duration of this highlight
-is determined by the variable @code{next-error-highlight}.
+is determined by the variable @code{next-error-highlight} for the locus
+in the selected buffer, and @code{next-error-highlight-no-select} for
+the locus in non-selected buffers.
 
 @vindex compilation-context-lines
   If the @file{*compilation*} buffer is shown in a window with a left
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index f39ce40..e7e8790 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1873,15 +1873,19 @@ You can use a vector for the simple cases too:
   Language and coding systems may cause problems with key bindings for
 non-@acronym{ASCII} characters.  @xref{Init Non-ASCII}.
 
+@findex define-key
   As described in @ref{Local Keymaps}, major modes and minor modes can
 define local keymaps.  These keymaps are constructed when the mode is
-used for the first time in a session.  If you wish to change one of
-these keymaps, you must use the @dfn{mode hook} (@pxref{Hooks}).
+loaded for the first time in a session.  The function @code{define-key}
+can be used to make changes in a specific keymap.  This function can
+also unset keys, when passed @code{nil} as the binding.
 
-@findex define-key
-  For example, Texinfo mode runs the hook @code{texinfo-mode-hook}.
-Here's how you can use the hook to add local bindings for @kbd{C-c n}
-and @kbd{C-c p} in Texinfo mode:
+  Since a mode's keymaps are not constructed until it has been loaded,
+you must delay running code which modifies them, e.g., by putting it
+on a @dfn{mode hook} (@pxref{(Hooks)}).  For example, Texinfo mode
+runs the hook @code{texinfo-mode-hook}.  Here's how you can use the
+hook to add local bindings for @kbd{C-c n} and @kbd{C-c p}, and remove
+the one for @kbd{C-c C-x x} in Texinfo mode:
 
 @example
 (add-hook 'texinfo-mode-hook
@@ -1890,6 +1894,7 @@ and @kbd{C-c p} in Texinfo mode:
                         'backward-paragraph)
             (define-key texinfo-mode-map "\C-cn"
                         'forward-paragraph)))
+            (define-key texinfo-mode-map "\C-c\C-xx" nil)
 @end example
 
 @node Modifier Keys
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index e15836e..fa5d1cf 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -168,7 +168,7 @@
 ;;     not specifically docstring related.  Would this even be useful?
 
 ;;; Code:
-(defvar checkdoc-version "0.6.1"
+(defvar checkdoc-version "0.6.2"
   "Release version of checkdoc you are currently running.")
 
 (require 'cl-lib)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index ad49616..59eedb5 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1000,6 +1000,8 @@ it is displayed along with the global value."
                    (terpri)
                     (let ((buf (current-buffer)))
                       (with-temp-buffer
+                        (lisp-mode-variables nil)
+                        (set-syntax-table emacs-lisp-mode-syntax-table)
                         (insert print-rep)
                         (pp-buffer)
                         (let ((pp-buffer (current-buffer)))
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index dabc8b9..a1ff2f6 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -173,7 +173,7 @@ documentation of `unload-feature' for details.")
 ;; we undefine it.
 ;; So we use this auxiliary variable to keep track of the last (t . SYMBOL)
 ;; that occurred.
-(defvar loadhist--restore-autoload
+(defvar loadhist--restore-autoload nil
   "If non-nil, this is a symbol for which we should
 restore a previous autoload if possible.")
 
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 2a281d4..a39c50e 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1992,17 +1992,16 @@ Note that this is a strict tail, so won't match, e.g. 
\"0x....\".")
 
   ;; Note: c-just-done-before-change is nil, t, or 'whole-buffer.
   (unless (c-called-from-text-property-change-p)
-    (save-restriction
-      (widen)
-      (unless c-just-done-before-change
-       (c-before-change (point-min) (point-max)))
-      (unless (eq c-just-done-before-change t)
+    (unless (eq c-just-done-before-change t)
+      (save-restriction
+       (widen)
+       (when (null c-just-done-before-change)
+         (c-before-change (point-min) (point-max)))
        (setq beg (point-min)
              end (point-max)
              old-len (- end beg)
              c-new-BEG (point-min)
-             c-new-END (point-max)))
-      (setq c-just-done-before-change nil)))
+             c-new-END (point-max)))))
 
   ;; (c-new-BEG c-new-END) will be the region to fontify.  It may become
   ;; larger than (beg end).
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 0677d36..22c6158 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -13334,7 +13334,7 @@ File statistics: \"%s\"\n\
 (defvar vhdl-font-lock-keywords nil
   "Regular expressions to highlight in VHDL Mode.")
 
-(defvar vhdl-font-lock-keywords-0
+(defvar vhdl-font-lock-keywords-0 nil
   ;; set in `vhdl-font-lock-init' because dependent on user options
   "For consideration as a value of `vhdl-font-lock-keywords'.
 This does highlighting of template prompts and directives (pragmas).")
diff --git a/lisp/simple.el b/lisp/simple.el
index 688dbcc..91736a6 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -75,14 +75,16 @@ value of 1 means that nothing is amalgamated.")
   :version "22.1")
 
 (defcustom next-error-highlight 0.5
-  "Highlighting of locations in selected source buffers.
+  "Highlighting of locations in the selected buffer.
 If a number, highlight the locus in `next-error' face for the given time
 in seconds, or until the next command is executed.
 If t, highlight the locus until the next command is executed, or until
 some other locus replaces it.
 If nil, don't highlight the locus in the source buffer.
 If `fringe-arrow', indicate the locus by the fringe arrow
-indefinitely until some other locus replaces it."
+indefinitely until some other locus replaces it.
+See `next-error-highlight-no-select' to customize highlighting
+of the locus in non-selected buffers."
   :type '(choice (number :tag "Highlight for specified time")
                  (const :tag "Semipermanent highlighting" t)
                  (const :tag "No highlighting" nil)
@@ -91,12 +93,15 @@ indefinitely until some other locus replaces it."
   :version "22.1")
 
 (defcustom next-error-highlight-no-select 0.5
-  "Highlighting of locations in `next-error-no-select'.
+  "Highlighting of locations in non-selected source buffers.
+Usually non-selected buffers are displayed by `next-error-no-select'.
 If number, highlight the locus in `next-error' face for given time in seconds.
 If t, highlight the locus indefinitely until some other locus replaces it.
 If nil, don't highlight the locus in the source buffer.
 If `fringe-arrow', indicate the locus by the fringe arrow
-indefinitely until some other locus replaces it."
+indefinitely until some other locus replaces it.
+See `next-error-highlight' to customize highlighting of the locus
+in the selected buffer."
   :type '(choice (number :tag "Highlight for specified time")
                  (const :tag "Semipermanent highlighting" t)
                  (const :tag "No highlighting" nil)
diff --git a/lisp/subr.el b/lisp/subr.el
index 96b98c6..13515ca 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3967,19 +3967,18 @@ the function `undo--wrap-and-run-primitive-undo'."
       (let ((undo--combining-change-calls t))
        (if (not inhibit-modification-hooks)
            (run-hook-with-args 'before-change-functions beg end))
-       (if (eq buffer-undo-list t)
-           (setq result (funcall body))
-         (let (;; (inhibit-modification-hooks t)
-                (before-change-functions
-                 ;; Ugly Hack: if the body uses syntax-ppss/syntax-propertize
-                 ;; (e.g. via a regexp-search or sexp-movement trigerring
-                 ;; on-the-fly syntax-propertize), make sure that this gets
-                 ;; properly refreshed after subsequent changes.
-                 (if (memq #'syntax-ppss-flush-cache before-change-functions)
-                     '(syntax-ppss-flush-cache)))
-                after-change-functions)
-           (setq result (funcall body)))
-         (let ((ap-elt
+       (let (;; (inhibit-modification-hooks t)
+              (before-change-functions
+               ;; Ugly Hack: if the body uses syntax-ppss/syntax-propertize
+               ;; (e.g. via a regexp-search or sexp-movement trigerring
+               ;; on-the-fly syntax-propertize), make sure that this gets
+               ;; properly refreshed after subsequent changes.
+               (if (memq #'syntax-ppss-flush-cache before-change-functions)
+                   '(syntax-ppss-flush-cache)))
+              after-change-functions)
+         (setq result (funcall body)))
+        (when (not (eq buffer-undo-list t))
+          (let ((ap-elt
                 (list 'apply
                       (- end end-marker)
                       beg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]