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...
This commit is contained in:
Glenn Morris 2020-03-04 13:57:58 -08:00
commit b5474ba160
9 changed files with 47 additions and 34 deletions

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)))

View file

@ -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.")

View file

@ -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).

View file

@ -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).")

View file

@ -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)

View file

@ -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