emacs-diffs
[Top][All Lists]
Advanced

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

master 4cf06bb: Merge from origin/emacs-28


From: Glenn Morris
Subject: master 4cf06bb: Merge from origin/emacs-28
Date: Fri, 22 Oct 2021 12:40:17 -0400 (EDT)

branch: master
commit 4cf06bb751c75dd2ae82c6e845c194107f93ee14
Merge: f7a2ff3 b0d64be
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Merge from origin/emacs-28
    
    b0d64be0bc (origin/emacs-28) Improve some NEWS entries
    7fde84e881 Improve documentation of syntax-ppss-context slightly
    5ecbed01b2 ; * test/lisp/mh-e/mh-utils-tests.el: Update macro declara...
    168665da59 Move some xwidget entries
    efde024361 time-stamp-tests: improvements to test macros
    06c944cff1 Fix rfc6068-parse-mailto-url autoload
    9b6b5e37ef Regexp-quote github domains in bug-reference
    1f6cdeb12c Ensure valid end/beginning lines in message-mark-inserted-...
    9b46150ab0 * etc/NEWS: Improve 'repeat-mode' entry.
    9c37b812da ; * lisp/repeat.el (repeat-mode): Fix docstring typo.
    caf87d80fa * lisp/repeat.el (repeat-keep-prefix): Expand description.
    24083c8d13 * lisp/net/eww.el (eww-retrieve-command): Add :tag.
    cf7d8fb1d7 Add description of cards to etc/refcards/README
    d2849cc645 Fix 'calculate-lisp-indent' when "[" starts containing sex...
    2a0a368ddc Fix typo in doc/emacs/anti.texi
    9529e1d2fb Update doc of Edebug specification for macros
    5bc522b4f4 ; * lisp/simple.el (kill-region): A better fix for bug#51320.
    ee6bdd6eef Fix non-interactive behavior of 'kill-region'
    2b7655ca0e ; More accurate doc string for 'tab-bar-format'
    2841e26744 * test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys.
    1cdb4d2077 * lisp/menu-bar.el (menu-bar-keymap): Add optional arg KEY...
    
    # Conflicts:
    #   etc/NEWS
    #   lisp/progmodes/bug-reference.el
---
 doc/emacs/anti.texi                     |   4 +-
 doc/lispref/edebug.texi                 |  14 ++-
 doc/lispref/syntax.texi                 |   1 +
 etc/NEWS.28                             | 154 ++++++++++++++++++--------------
 etc/refcards/README                     |  45 ++++++++++
 lisp/emacs-lisp/lisp-mode.el            |   9 +-
 lisp/gnus/message.el                    |   2 +
 lisp/menu-bar.el                        |   9 +-
 lisp/mouse.el                           |   2 +-
 lisp/net/browse-url.el                  |   2 +-
 lisp/net/eww.el                         |   8 +-
 lisp/progmodes/bug-reference.el         |   3 +-
 lisp/repeat.el                          |   4 +-
 lisp/simple.el                          |  12 ++-
 lisp/tab-bar.el                         |   9 +-
 test/lisp/dabbrev-tests.el              |  13 ++-
 test/lisp/emacs-lisp/find-func-tests.el |   2 +-
 test/lisp/international/mule-tests.el   |   2 +-
 test/lisp/mh-e/mh-utils-tests.el        |   4 +-
 test/lisp/time-stamp-tests.el           |  13 +--
 20 files changed, 200 insertions(+), 112 deletions(-)

diff --git a/doc/emacs/anti.texi b/doc/emacs/anti.texi
index 354f20e..3b02187 100644
--- a/doc/emacs/anti.texi
+++ b/doc/emacs/anti.texi
@@ -35,8 +35,8 @@ As Motif becomes more and more important with moving farther 
into the
 past, we've reinstated the code which supports Motif in Emacs.
 
 @item
-Emacs once again supports versions 5.3 and older OpenBSD system, which
-will be needed as you move back in time.
+Emacs once again supports versions 5.3 and older OpenBSD systems,
+which will be needed as you move back in time.
 
 @item
 We've dropped support for Secure Computing filter on GNU/Linux.  The
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index 323130f..7d67cc3 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -1216,9 +1216,7 @@ directs processing of arguments.
 @table @asis
 @item @code{t}
 All arguments are instrumented for evaluation.
-
-@item @code{0}
-None of the arguments is instrumented.
+This is short for @code{(body)}.
 
 @item a symbol
 The symbol must have an Edebug specification, which is used instead.
@@ -1528,6 +1526,16 @@ example of the @code{let} specification.
 It may be easier to understand Edebug specifications by studying
 the examples provided here.
 
+Consider a hypothetical macro @code{my-test-generator} that runs
+tests on supplied lists of data.  Although it is Edebug's default
+behavior to not instrument arguments as code, as controlled by
+@code{edebug-eval-macro-args} (@pxref{Instrumenting Macro Calls}),
+it can be useful to explicitly document that the arguments are data:
+
+@example
+(def-edebug-spec my-test-generator (&rest sexp))
+@end example
+
 A @code{let} special form has a sequence of bindings and a body.  Each
 of the bindings is either a symbol or a sublist with a symbol and
 optional expression.  In the specification below, notice the @code{gate}
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index deec3f4..87ade73 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -900,6 +900,7 @@ arrived at a top level position.
 @defun syntax-ppss-context state
 Return @code{string} if the end position of the scan returning
 @var{state} is in a string, and @code{comment} if it's in a comment.
+Otherwise return @code{nil}.
 @end defun
 
 @node Low-Level Parsing
diff --git a/etc/NEWS.28 b/etc/NEWS.28
index 4caf81d..4942a35 100644
--- a/etc/NEWS.28
+++ b/etc/NEWS.28
@@ -80,12 +80,13 @@ This was only ever relevant when building from a repository 
checkout.
 This now requires makeinfo, which is part of the texinfo package.
 
 ---
-** There is a new configure option '--disable-year2038' to cause
-Emacs to use only 32-bit time_t on platforms that have both 32- and
-64-bit time_t.  This may help link Emacs to a library with ABI
-requiring traditional 32-bit time_t.  This option currently affects
-only 32-bit ARM and x86 running GNU/Linux with glibc 2.34 and later.
-Emacs now defaults to 64-bit time_t on these platforms.
+** New configure option '--disable-year2038'.
+This causes Emacs to use only 32-bit time_t on platforms that have
+both 32- and 64-bit time_t.  This may help when linking Emacs with a
+library with an ABI requiring traditional 32-bit time_t.  This option
+currently affects only 32-bit ARM and x86 running GNU/Linux with glibc
+2.34 and later.  Emacs now defaults to 64-bit time_t on these
+platforms.
 
 ---
 ** Support for building with '-fcheck-pointer-bounds' has been removed.
@@ -273,9 +274,9 @@ whether the function 'read-answer' accepts short answers.
 +++
 ** New user option 'kill-buffer-delete-auto-save-files'.
 If non-nil, killing a buffer that has an auto-save file will prompt
-the user for whether that file should be deleted.  (Note that
-'delete-auto-save-files', if non-nil, was previously documented to
-result in deletion of auto-save files when killing a buffer without
+the user for whether that auto-save file should be deleted.  (Note
+that 'delete-auto-save-files', if non-nil, was previously documented
+to result in deletion of auto-save files when killing a buffer without
 unsaved changes, but this has apparently not worked for several
 decades, so the documented semantics of this variable has been changed
 to match the behavior.)
@@ -354,6 +355,8 @@ of the next command to be displayed in a new frame.
 *** New command 'clone-frame' (bound to 'C-x 5 c').
 This is like 'C-x 5 2', but uses the window configuration and frame
 parameters of the current frame instead of 'default-frame-alist'.
+When called interactively with a prefix arg, the window configuration
+is not cloned.
 
 ---
 *** Default values of 'frame-title-format' and 'icon-title-format' have 
changed.
@@ -393,12 +396,13 @@ of the next command to be displayed in a new window.
 
 +++
 *** New command 'recenter-other-window', bound to 'S-M-C-l'.
-Like 'recenter-top-bottom' acting on the other window.
+Like 'recenter-top-bottom', but acting on the other window.
 
 +++
 *** New user option 'delete-window-choose-selected'.
-This allows to choose a window that will be the frame's selected
-window after deleting the currently selected one.
+This allows specifying how Emacs chooses which window will be the
+frame's selected window after the currently selected window is
+deleted.
 
 +++
 *** New argument NO-OTHER for some window functions.
@@ -496,7 +500,7 @@ on each frame compared to the numerical value of 
'tab-bar-show'.
 *** New command 'toggle-frame-tab-bar'.
 It can be used to enable/disable the tab bar on the currently selected
 frame regardless of the values of 'tab-bar-mode' and 'tab-bar-show'.
-This allows to enable/disable the tab bar independently on different
+This allows enabling/disabling the tab bar independently on different
 frames.
 
 ---
@@ -510,10 +514,10 @@ the tab bar displays tab groups.
 
 ---
 *** New optional key binding for 'tab-last'.
-If you customize the user option 'tab-bar-select-tab-modifiers' for
-selecting tabs using its index numbers, the '<MODIFIER>-9' key is
-bound to 'tab-last', and switches to the last tab.  Here <MODIFIER> is
-any of the modifiers in the list that is the value of
+If you customize the user option 'tab-bar-select-tab-modifiers' to
+allow selecting tabs using their index numbers, the '<MODIFIER>-9' key
+is bound to 'tab-last', and switches to the last tab.  Here <MODIFIER>
+is any of the modifiers in the list that is the value of
 'tab-bar-select-tab-modifiers'.  You can also use negative indices,
 which count from the last tab: -1 is the last tab, -2 the one before
 that, etc.
@@ -700,6 +704,7 @@ the same syntax as 'auto-save-file-name-transforms'.
 +++
 *** New user option 'remote-file-name-inhibit-locks'.
 When non-nil, this option suppresses lock files for remote files.
+Default is nil.
 
 +++
 *** New minor mode 'lock-file-mode'.
@@ -944,8 +949,8 @@ having those two commands on the 'M-o' keymap; see the next 
section.
 ** The 'M-o M-s' and 'M-o M-S' global bindings have been removed.
 Use 'M-x center-line' and 'M-x center-paragraph' instead.  See the
 previous section for how to get back the old bindings.  Alternatively,
-if you only want these two commands to have global bindings they had
-before, you can add the following to your init file:
+if you only want these two commands to have the global bindings they
+had before, you can add the following to your init file:
 
     (define-key global-map "\M-o\M-s" 'center-line)
     (define-key global-map "\M-o\M-S" 'center-paragraph)
@@ -1003,10 +1008,10 @@ file:
 ** Xref migrated from EIEIO to cl-defstruct for its core objects.
 This means that 'oref' and 'with-slots' no longer works on them, and
 'make-instance' can no longer be used to create those instances (which
-wasn't recommended anyway).  Packages should keep to using the
-functions like 'xref-make', 'xref-make-match', 'xref-make-*-location',
-as well as accessor functions 'xref-item-summary' and
-'xref-item-location'.
+wasn't recommended anyway).  Packages should restrict themselves to
+using functions like 'xref-make', 'xref-make-match',
+'xref-make-*-location', as well as accessor functions
+'xref-item-summary' and 'xref-item-location'.
 
 Among the benefits are better performance (noticeable when there are a
 lot of matches) and improved flexibility: 'xref-match-item' instances
@@ -1143,7 +1148,8 @@ less.
 +++
 ** New user option 'revert-buffer-quick-short-answers'.
 This controls how the new 'revert-buffer-quick' ('C-x x g') command
-prompts.
+prompts.  A non-nil value will make it use 'y-or-n-p' rather than
+'yes-or-no-p'.  Defaults to nil.
 
 +++
 ** New user option 'query-about-changed-file'.
@@ -1197,7 +1203,7 @@ buffer to be able to move point to the inaccessible 
portion.
 When called interactively, 'goto-char' now offers the position at
 point as the default.
 
-** Autosaving via 'auto-save-visited-mode' can now be inhibited.
+** Auto-saving via 'auto-save-visited-mode' can now be inhibited.
 Set the variable 'auto-save-visited-mode' buffer-locally to nil to
 achieve that.
 
@@ -1211,7 +1217,7 @@ It used to be enabled when Emacs is started in GUI mode 
but not when started
 in text mode.  The cursor still only actually blinks in GUI frames.
 
 ** 'show-paren-mode' is now enabled by default.
-To go back to the previous behavior, customize the user option by the
+To go back to the previous behavior, customize the user option of the
 same name to nil.
 
 +++
@@ -1305,8 +1311,8 @@ displaying "by name" or "by date" sort order.
 
 +++
 *** New user option 'dired-compress-directory-default-suffix'.
-This user option controls default suffix for compressing a directory.
-If it's nil, ".tar.gz" will be used.  Refer to
+This user option controls the default suffix for compressing a
+directory.  If it's nil, ".tar.gz" will be used.  Refer to
 'dired-compress-files-alist' for a list of supported suffixes.
 
 +++
@@ -1327,7 +1333,7 @@ select a different backup file instead.
 +++
 *** New user option 'dired-maybe-use-globstar'.
 If set, enables globstar (recursive globbing) in shells that support
-this feature, but turn it off by default.  This allows producing
+this feature, but have it turned off by default.  This allows producing
 directory listings with files matching a wildcard in all the
 subdirectories of a given directory.  The new variable
 'dired-enable-globstar-in-shell' lists which shells can have globstar
@@ -1419,7 +1425,7 @@ major mode.
 
 +++
 *** 'ispell-comments-and-strings' now accepts START and END arguments.
-These arguments default to active region when used interactively.
+These arguments default to the active region when used interactively.
 
 +++
 *** New command 'ispell-comment-or-string-at-point'.
@@ -2061,7 +2067,7 @@ consistency, the 'M-s M-r' key binding has been added for 
the
 'gnus-summary-search-article-backward' command.)
 
 ---
-*** The value of "all" in the 'large-newsgroup-initial' group parameter 
changes.
+*** The value for "all" in the 'large-newsgroup-initial' group parameter has 
changed.
 It was previously nil, which didn't work, because nil is
 indistinguishable from not being present.  The new value for "all" is
 the symbol 'all'.
@@ -2359,14 +2365,6 @@ Its default value matches localized abbreviations of the 
"reply"
 prefix on the Subject line in various languages.
 
 ---
-*** New user option 'shr-offer-extend-specpdl'.
-If this is nil, rendering of HTML in the email message body that
-requires to enlarge 'max-specpdl-size', the number of Lisp variable
-bindings, will be aborted, and Emacs will not ask you whether to
-enlarge 'max-specpdl-size' to complete the rendering.  The default is
-t, which preserves the original behavior.
-
----
 *** New user option 'rmail-show-message-set-modified'.
 If set non-nil, showing an unseen message will set the Rmail buffer's
 modified flag.  The default is nil, to preserve the old behavior.
@@ -2520,10 +2518,10 @@ However, if "~/Downloads/" already exists, that will 
continue to be
 used.
 
 ---
-*** The command 'eww-follow-link' now supports custom mailto handlers.
+*** The command 'eww-follow-link' now supports custom mailto: handlers.
 The function that is invoked when clicking on or otherwise following a
 'mailto:' link in an EWW buffer can now be customized.  For more
-information, see the related entry about 'shr-browse-url' above.
+information, see the related entry about 'shr-browse-url' below.
 
 ---
 *** Support for bookmark.el.
@@ -2540,6 +2538,14 @@ This is still the case by default, but if you customize
 'browse-url-mailto-function' or 'browse-url-handlers' to call some
 other function, it will now be called instead of the default.
 
+---
+*** New user option 'shr-offer-extend-specpdl'.
+If this is nil, rendering of HTML that requires enlarging
+'max-specpdl-size', the number of Lisp variable bindings, will be
+aborted, and Emacs will not ask you whether to enlarge
+'max-specpdl-size' to complete the rendering.  The default is t, which
+preserves the original behavior.
+
 +++
 *** New user option 'shr-max-width'.
 If this user option is non-nil, and 'shr-width' is nil, then SHR will
@@ -2615,7 +2621,8 @@ sub-directory.
 
 +++
 *** 'project-find-file' doesn't use the string at point as default input.
-Now it's only suggested as part of the "future history".
+Now it's only suggested as part of the "future history", accessible
+via 'M-n'.
 
 +++
 *** New command 'project-find-dir' runs Dired in a directory inside project.
@@ -2971,6 +2978,18 @@ user-visible changes in ERC.
 point in history).
 
 ---
+*** Downloading files from xwidget-webkit is now supported.
+The new user option 'xwidget-webkit-download-dir' says where to download to.
+
+---
+*** New command 'xwidget-webkit-clone-and-split-below'.
+Open a new window below displaying the current URL.
+
+---
+*** New command 'xwidget-webkit-clone-and-split-right'.
+Open a new window to the right displaying the current URL.
+
+---
 *** Pixel-based scrolling.
 The 'xwidget-webkit-scroll-up', 'xwidget-webkit-scroll-down' commands
 now supports scrolling arbitrary pixel values.  It now treats the
@@ -3192,7 +3211,7 @@ effect.
 
 ---
 *** The width of the buffer-name column in 'list-buffers' is now dynamic.
-The width now depends of the width of the window, but will never be
+The width now depends on the width of the window, but will never be
 wider than the length of the longest buffer name, except that it will
 never be narrower than 19 characters.
 
@@ -3225,16 +3244,24 @@ Type 'M-x repeat-mode RET' to enable this mode.  You 
can then type
 instead of 'C-x o C-x o' to switch windows, 'C-x { { } } ^ ^ v v' to
 resize the selected window interactively, 'M-g n n p p' to navigate
 next-error matches.  Any other key exits this temporarily enabled
-transient mode that supports shorter keys, and then after exiting
-from this mode the default key binding is used for the last typed key.
-'repeat-exit-key' defines an additional key to exit mode like
-'isearch-exit' ('RET').  The user option 'repeat-exit-timeout'
-specifies the number of seconds of idle time to break the repetition
-chain automatically.  With 'repeat-keep-prefix' you can keep the
-prefix arg of the previous command.  For example, this can help to
-reverse the window navigation direction with e.g. 'C-x o M-- o o'.
-Also it can help to set a new step with e.g. 'C-x { C-5 { { {',
-which will set the window resizing step to 5 columns.
+transient mode that supports shorter keys, and then after exiting from
+this mode the default key binding is used for the last typed key.
+
+The user option 'repeat-exit-key' defines an additional key usable to
+exit the mode like 'isearch-exit' ('RET').
+
+The user option 'repeat-exit-timeout' (default nil, which means
+forever) specifies the number of seconds of idle time after which to
+break the repetition chain automatically.
+
+When user option 'repeat-keep-prefix' is non-nil (the default), the
+prefix arg of the previous command is kept.  This can be used to
+e.g. reverse the window navigation direction with 'C-x o M-- o o' or
+to set a new step with 'C-x { C-5 { { {', which will set the window
+resizing step to 5 columns.
+
+'M-x describe-repeat-maps' will display a buffer showing
+which commands are repeatable in 'repeat-mode'.
 
 ---
 ** New themes 'modus-vivendi' and 'modus-operandi'.
@@ -3683,7 +3710,7 @@ user option has been renamed to 
'find-library-source-path', and
 ** The 'interactive' syntax has been extended to allow listing applicable 
modes.
 Forms like '(interactive "p" dired-mode)' can be used to annotate the
 commands as being applicable for modes derived from 'dired-mode',
-or if the mode is a minor mode, that the current buffer has that
+or if the mode is a minor mode, when the current buffer has that
 minor mode activated.  Note that using this form will create byte code
 that is not compatible with byte code in previous Emacs versions.
 
@@ -3694,7 +3721,7 @@ to say whether the command should be present when 
completing with
 'M-x TAB'.  '(declare (modes MODE...))' can be used as a short-hand
 way of saying that the command should be present when completing from
 buffers in major modes derived from MODE..., or, if it's a minor mode,
-whether that minor mode is enabled in the current buffer.
+when that minor mode is enabled in the current buffer.
 
 +++
 ** 'define-minor-mode'  now takes an ':interactive' argument.
@@ -4426,7 +4453,7 @@ also keep the type information of their arguments.  Use 
the
 
 +++
 *** New minor mode 'button-mode'.
-This minor mode does nothing else than install 'button-buffer-map' as
+This minor mode does nothing except install 'button-buffer-map' as
 a minor mode map (which binds the 'TAB' / 'S-TAB' key bindings to navigate
 to buttons), and can be used in any view-mode-like buffer that has
 buttons in it.
@@ -4444,7 +4471,8 @@ line when displaying that buffer.
 
 This is useful for major modes that arrange their display in a tabular
 form below the header line.  It is enabled by default in
-'tabulated-list-mode' and its derived modes.
+'tabulated-list-mode' and its derived modes, and disabled by default
+elsewhere.
 
 ---
 ** 'ascii' is now a coding system alias for 'us-ascii'.
@@ -4512,18 +4540,6 @@ webkit browser with 'M-x xwidget-webkit-browse-url'.  
Viewing two
 instances of xwidget webkit is not supported.
 
 ---
-*** Downloading files from xwidget-webkit is now supported.
-The new user option 'xwidget-webkit-download-dir' says where to download to.
-
----
-*** New command 'xwidget-webkit-clone-and-split-below'.
-Open a new window below displaying the current URL.
-
----
-*** New command 'xwidget-webkit-clone-and-split-right'.
-Open a new window to the right displaying the current URL.
-
----
 *** New user option 'xwidget-webkit-enable-plugins'.
 If non-nil, enable plugins in xwidget.  (This is only available on
 macOS.)
diff --git a/etc/refcards/README b/etc/refcards/README
index 30c82bc..94bf7b1 100644
--- a/etc/refcards/README
+++ b/etc/refcards/README
@@ -23,6 +23,51 @@ PDF and PS copies of these cards are also available at
 <https://www.gnu.org/software/emacs/refcards>.  The FSF online
 store <https://shop.fsf.org/> sometimes has printed copies for sale.
 
+List of generated cards:
+
+    calccard.pdf           Calc Reference Card
+    dired-ref.pdf          Dired Reference Card
+    gnus-booklet.pdf       Gnus Reference Booklet
+    gnus-refcard.pdf       Gnus Reference Card
+    orgcard.pdf            Org-Mode Reference Card
+    refcard.pdf            Emacs Reference Card
+    survival.pdf           Emacs Survival Card
+    vipcard.pdf            VIP Quick Reference Card
+    viperCard.pdf          ViperCard: Viper Reference Pal
+
+Brazilian Portuguese
+
+    pt-br-refcard.pdf      Reference Card (pt-br)
+
+Czech
+
+    cs-dired-ref.pdf       Dired Reference Card (cs)
+    cs-refcard.pdf         Emacs Reference Card (cs)
+    cs-survival.pdf        Emacs Survival Card (cs)
+
+French
+
+    fr-dired-ref.pdf       Dired Reference Card (fr)
+    fr-refcard.pdf         Emacs Reference Card (fr)
+    fr-survival.pdf        Emacs Survival Card (fr)
+
+German
+
+    de-refcard.pdf         Emacs Reference Card (de)
+
+Polish
+
+    pl-refcard.pdf         Emacs Reference Card (pl)
+
+Russian
+
+    ru-refcard.pdf         Emacs Reference Card (ru)
+
+Slovak
+
+    sk-dired-ref.pdf       Dired Reference Card (sk)
+    sk-refcard.pdf         Emacs Reference Card (sk)
+    sk-survival.pdf        Emacs Survival Card (sk)
 
 
 COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 57fc750..5dfb1fa 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1078,10 +1078,11 @@ is the buffer position of the start of the containing 
expression."
                       ;; Handle prefix characters and whitespace
                       ;; following an open paren.  (Bug#1012)
                        (backward-prefix-chars)
-                       (while (not (or (looking-back "^[ \t]*\\|([ \t]+"
-                                                      
(line-beginning-position))
-                                       (and containing-sexp
-                                            (>= (1+ containing-sexp) 
(point)))))
+                       (while (not (save-excursion
+                                     (skip-chars-backward " \t")
+                                     (or (= (point) (line-beginning-position))
+                                         (and containing-sexp
+                                              (= (point) (1+ 
containing-sexp))))))
                          (forward-sexp -1)
                          (backward-prefix-chars))
                        (setq calculate-lisp-indent-last-sexp (point)))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index e165a04..935ea9b 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2395,6 +2395,8 @@ If VERBATIM, use slrn style verbatim marks (\"#v+\" and 
\"#v-\")."
   (save-excursion
     ;; add to the end of the region first, otherwise end would be invalid
     (goto-char end)
+    (unless (bolp)
+      (insert "\n"))
     (insert (if verbatim "#v-\n" message-mark-insert-end))
     (goto-char beg)
     (insert (if verbatim "#v+\n" message-mark-insert-begin))))
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 980ba2f..fafc99e 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2713,10 +2713,13 @@ This command is to be used when you click the mouse in 
the menubar."
                        (cdr menu-bar-item-cons)
                      0))))
 
-(defun menu-bar-keymap ()
+(defun menu-bar-keymap (&optional keymap)
   "Return the current menu-bar keymap.
+The ordering of the return value respects `menu-bar-final-items'.
 
-The ordering of the return value respects `menu-bar-final-items'."
+It's possible to use the KEYMAP argument to override the default keymap
+that is the currently active maps.  For example, the argument KEYMAP
+could provide `global-map' where items are limited to the global map only."
   (let ((menu-bar '())
         (menu-end '()))
     (map-keymap
@@ -2729,7 +2732,7 @@ The ordering of the return value respects 
`menu-bar-final-items'."
              ;; sorting.
              (push (cons pos menu-item) menu-end)
            (push menu-item menu-bar))))
-     (lookup-key (menu-bar-current-active-maps) [menu-bar]))
+     (lookup-key (or keymap (menu-bar-current-active-maps)) [menu-bar]))
     `(keymap ,@(nreverse menu-bar)
              ,@(mapcar #'cdr (sort menu-end
                                    (lambda (a b)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 1036f10..d691289 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -364,7 +364,7 @@ Some context functions add menu items below the separator."
                 (when (consp binding)
                   (define-key-after menu (vector key)
                     (copy-sequence binding))))
-              (lookup-key global-map [menu-bar]))
+              (menu-bar-keymap global-map))
   menu)
 
 (defun context-menu-local (menu _click)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index b21c66e..3af37e4 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1600,7 +1600,7 @@ used instead of `browse-url-new-window-flag'."
 
 ;; --- mailto ---
 
-(autoload 'rfc6068-parse-mailto-url "rfc2368")
+(autoload 'rfc6068-parse-mailto-url "rfc6068")
 
 ;;;###autoload
 (defun browse-url-mail (url &optional new-window)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 178a25e..c24a2c5 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -145,12 +145,12 @@ The string will be passed through 
`substitute-command-keys'."
   "Command to retrieve an URL via an external program.
 If nil, `url-retrieve' is used to download the data.
 If `sync', `url-retrieve-synchronously' is used.
-For other non-nil values, this should be a list where the first item
-is the program, and the rest are the arguments."
+For other non-nil values, this should be a list of strings where
+the first item is the program, and the rest are the arguments."
   :version "28.1"
   :type '(choice (const :tag "Use `url-retrieve'" nil)
                  (const :tag "Use `url-retrieve-synchronously'" sync)
-                 (repeat string)))
+                 (repeat :tag "Command/args" string )))
 
 (defcustom eww-use-external-browser-for-content-type
   "\\`\\(video/\\|audio/\\|application/ogg\\)"
@@ -1947,7 +1947,7 @@ Use link at point if there is one, else the current 
page's URL."
 (defun eww-set-character-encoding (charset)
   "Set character encoding to CHARSET.
 If CHARSET is nil then use UTF-8."
-  (interactive "zUse character set (default utf-8): " eww-mode)
+  (interactive "zUse character set (default `utf-8'): " eww-mode)
   (if (null charset)
       (eww-reload nil 'utf-8)
     (eww-reload nil charset)))
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 6385057..150dfac 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -270,7 +270,8 @@ via the internet it might also be http.")
 ;; possibly different projects are also supported.
 (cl-defmethod bug-reference--build-forge-setup-entry
   (host-domain (_forge-type (eql 'github)) protocol)
-  `(,(concat "[/@]" host-domain "[/:]\\([.A-Za-z0-9_/-]+\\)\\.git")
+  `(,(concat "[/@]" (regexp-quote host-domain)
+             "[/:]\\([.A-Za-z0-9_/-]+\\)\\.git")
     "\\(\\([.A-Za-z0-9_/-]+\\)?\\(?:#\\)\\([0-9]+\\)\\)\\>"
     ,(lambda (groups)
        (let ((ns-project (nth 1 groups)))
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 42590b7..ac08952 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -355,7 +355,7 @@ of the specified number of seconds."
   "Timer activated after the last key typed in the repeating key sequence.")
 
 (defcustom repeat-keep-prefix t
-  "Keep the prefix arg of the previous command."
+  "Whether to keep the prefix arg of the previous command when repeating."
   :type 'boolean
   :group 'convenience
   :version "28.1")
@@ -387,7 +387,7 @@ the map can't be set on the command symbol property 
`repeat-map'.")
   "Toggle Repeat mode.
 When Repeat mode is enabled, and the command symbol has the property named
 `repeat-map', this map is activated temporarily for the next command.
-See `describe-repeat-maps' for a list of all repeatable command."
+See `describe-repeat-maps' for a list of all repeatable commands."
   :global t :group 'convenience
   (if (not repeat-mode)
       (remove-hook 'post-command-hook 'repeat-post-hook)
diff --git a/lisp/simple.el b/lisp/simple.el
index 4f711d6..9b62284 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5293,12 +5293,16 @@ Lisp programs should use this function for killing text.
 Supply two arguments, character positions BEG and END indicating the
  stretch of text to be killed.  If the optional argument REGION is
  non-nil, the function ignores BEG and END, and kills the current
- region instead."
+ region instead.  Interactively, REGION is always non-nil, and so
+ this command always kills the current region."
   ;; Pass mark first, then point, because the order matters when
   ;; calling `kill-append'.
-  (interactive (list (mark) (point) 'region))
-  (unless (and beg end)
-    (user-error "The mark is not set now, so there is no region"))
+  (interactive (progn
+                 (let ((beg (mark))
+                       (end (point)))
+                   (unless (and beg end)
+                     (user-error "The mark is not set now, so there is no 
region"))
+                   (list beg end 'region))))
   (condition-case nil
       (let ((string (if region
                         (funcall region-extract-function 'delete)
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index a3316bf..10ff57b 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -706,8 +706,13 @@ the formatted tab name to display in the tab bar."
 Every item in the list is a function that returns
 a string, or a list of menu-item elements, or nil.
 Adding a function to the list causes the tab bar to show
-that string, or display a menu with those menu items when
-you click on the tab bar.
+that string, or display a tab button which, when clicked,
+will invoke the command that is the binding of the menu item.
+The menu-item binding of nil will produce a tab clicking
+on which will select that tab.  The menu-item's title is
+displayed as the label of the tab.
+If a function returns nil, it doesn't directly affect the
+tab bar appearance, but can do that by some side-effect.
 If the list ends with `tab-bar-format-align-right' and
 `tab-bar-format-global', then after enabling `display-time-mode'
 (or any other mode that uses `global-mode-string'),
diff --git a/test/lisp/dabbrev-tests.el b/test/lisp/dabbrev-tests.el
index e4b7837..d3fe78b 100644
--- a/test/lisp/dabbrev-tests.el
+++ b/test/lisp/dabbrev-tests.el
@@ -29,16 +29,15 @@
 
 (ert-deftest dabbrev-expand-test ()
   "Test for bug#1948.
-When DABBREV-ELIMINATE-NEWLINES is non-nil (the default),
-repeated calls to DABBREV-EXPAND can result in the source of
+When `dabbrev-eliminate-newlines' is non-nil (the default),
+repeated calls to `dabbrev-expand' can result in the source of
 first expansion being replaced rather than the destination."
   (with-temp-buffer
    (insert "ab  x\na\nab  y")
    (goto-char 8)
    (save-window-excursion
      (set-window-buffer nil (current-buffer))
-     ;; M-/ SPC M-/ M-/
-     (execute-kbd-macro "\257 \257\257"))
+     (execute-kbd-macro (kbd "M-/ SPC M-/ M-/")))
    (should (string= (buffer-string) "ab  x\nab y\nab  y"))))
 
 (ert-deftest dabbrev-completion-test ()
@@ -52,8 +51,7 @@ buffers unless a prefix argument is used."
       (goto-char 6)
       (save-window-excursion
         (set-window-buffer nil (current-buffer))
-        ;; C-M-/
-        (execute-kbd-macro [201326639]))
+        (execute-kbd-macro (kbd "C-M-/")))
       (should (string= (buffer-string) "abc\nabc")))))
 
 (ert-deftest dabbrev-completion-test-with-argument ()
@@ -67,8 +65,7 @@ multiple expansions."
       (goto-char 6)
       (save-window-excursion
         (set-window-buffer nil (current-buffer))
-        ;; C-u C-u C-M-/
-        (execute-kbd-macro [21 21 201326639]))
+        (execute-kbd-macro (kbd "C-u C-u C-M-/")))
       (should (string= (buffer-string) "abc\na")))))
 
 ;;; dabbrev-tests.el ends here
diff --git a/test/lisp/emacs-lisp/find-func-tests.el 
b/test/lisp/emacs-lisp/find-func-tests.el
index 28a9a7e..987e404 100644
--- a/test/lisp/emacs-lisp/find-func-tests.el
+++ b/test/lisp/emacs-lisp/find-func-tests.el
@@ -26,7 +26,7 @@
 
 ;;; Code:
 
-(require 'ert-x)                        ;For `ert-run-keys'.
+(require 'ert-x)                        ;For `ert-simulate-keys'.
 (require 'find-func)
 
 (ert-deftest find-func-tests--library-completion () ;bug#43393
diff --git a/test/lisp/international/mule-tests.el 
b/test/lisp/international/mule-tests.el
index 7727c11..8ca1ade 100644
--- a/test/lisp/international/mule-tests.el
+++ b/test/lisp/international/mule-tests.el
@@ -23,7 +23,7 @@
 
 ;;; Code:
 
-(require 'ert-x)                        ;For `ert-run-keys'.
+(require 'ert-x)                        ;For `ert-simulate-keys'.
 
 (ert-deftest find-auto-coding--bug27391 ()
   "Check that Bug#27391 is fixed."
diff --git a/test/lisp/mh-e/mh-utils-tests.el b/test/lisp/mh-e/mh-utils-tests.el
index a10c29f..ed97923 100644
--- a/test/lisp/mh-e/mh-utils-tests.el
+++ b/test/lisp/mh-e/mh-utils-tests.el
@@ -110,7 +110,7 @@ can log the choice only once, which makes the batch log 
easier to read.")
 Functions that touch the file system or run MH programs are either
 mocked out or pointed at a test tree.  Uses `mh-test-utils-setup' to
 select which."
-  (declare (indent defun))
+  (declare (indent 0) (debug t))
   `(cl-letf ((temp-home-dir nil)
              ;; make local bindings for things we will modify for test env
              (mh-user-path)
@@ -374,6 +374,7 @@ values for the FLAG argument of 
`mh-folder-completion-function'.
 NIL-EXPECTED is the expected value with FLAG nil.
 T-EXPECTED is the expected value with FLAG t.
 LAMBDA-EXPECTED is the expected value with FLAG lambda."
+  (declare (debug t))
   `(with-mh-test-env
      (mh-test-folder-completion-2 ,nil-expected ;case "a"
                                   (mh-folder-completion-function ,name nil 
nil))
@@ -388,6 +389,7 @@ LAMBDA-EXPECTED is the expected value with FLAG lambda."
 ACTUAL should evaluate to either EXPECTED or to a list containing EXPECTED.
 ACTUAL may be evaluated twice, but this gives a clearer error on failure,
 and the `should' macro requires idempotent evaluation anyway."
+  (declare (debug t))
   `(if (and (not (consp ,expected)) (consp ,actual))
        (should (member ,expected ,actual))
      (should (equal ,expected ,actual))))
diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el
index 0449704..fa9edcb 100644
--- a/test/lisp/time-stamp-tests.el
+++ b/test/lisp/time-stamp-tests.el
@@ -26,7 +26,7 @@
 
 (defmacro with-time-stamp-test-env (&rest body)
   "Evaluate BODY with some standard time-stamp test variables bound."
-  (declare (indent defun))
+  (declare (indent 0) (debug t))
   `(let ((user-login-name "test-logname")
          (user-full-name "100%d Tester") ;verify "%" passed unchanged
          (buffer-file-name "/emacs/test/time-stamped-file")
@@ -46,7 +46,7 @@
 
 (defmacro with-time-stamp-test-time (reference-time &rest body)
   "Force any contained time-stamp call to use time REFERENCE-TIME."
-  (declare (indent defun))
+  (declare (indent 1) (debug t))
   `(cl-letf*
          ((orig-time-stamp-string-fn (symbol-function 'time-stamp-string))
          ((symbol-function 'time-stamp-string)
@@ -56,13 +56,14 @@
 
 (defmacro with-time-stamp-system-name (name &rest body)
   "Force (system-name) to return NAME while evaluating BODY."
-  (declare (indent defun))
+  (declare (indent 1) (debug t))
   `(cl-letf (((symbol-function 'system-name)
               (lambda () ,name)))
      ,@body))
 
 (defmacro time-stamp-should-warn (form)
   "Similar to `should' but verifies that a format warning is generated."
+  (declare (debug t))
   `(let ((warning-count 0))
      (cl-letf (((symbol-function 'time-stamp-conv-warn)
                 (lambda (_old _new)
@@ -761,6 +762,7 @@ and is used for testing."
   "Formats ZONE and compares it to EXPECT.
 Uses the free variables `form-string' and `pattern-mod'.
 The functions in `pattern-mod' are composed left to right."
+  (declare (debug t))
   `(let ((result ,expect))
      (dolist (fn pattern-mod)
        (setq result (funcall fn result)))
@@ -895,10 +897,11 @@ BIG-MOD is the result for offset +100 hours and modifiers 
for the other
 expected results for hours greater than 99 with a whole number of minutes.
 SECBIG-MOD is the result for offset +100 hours 30 seconds and modifiers for
 the other expected results for hours greater than 99 with non-zero seconds."
-  (declare (indent 1))
+  (declare (indent 1) (debug (&rest sexp)))
   ;; Generate a form to create a list of tests to define.  When this
   ;; macro is called, the form is evaluated, thus defining the tests.
-  (let ((ert-test-list '(list)))
+  ;; We will modify this list, so start with a list consed at runtime.
+  (let ((ert-test-list (list 'list)))
     (dolist (form-string form-strings ert-test-list)
       (nconc
        ert-test-list



reply via email to

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