From 1cdb4d2077c4e402bf2b2991e8395f0ccdedd1d1 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 21 Oct 2021 19:55:24 +0300 Subject: [PATCH 01/21] * lisp/menu-bar.el (menu-bar-keymap): Add optional arg KEYMAP (bug#50067). * lisp/mouse.el (context-menu-global): Use 'menu-bar-keymap' with its arg KEYMAP set to 'global-map'. --- lisp/menu-bar.el | 9 ++++++--- lisp/mouse.el | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 1cc126b5017..f19dc9e7c97 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2696,10 +2696,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 @@ -2712,7 +2715,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 bcb58d153a8..7bac6dd07bf 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) From 2841e26744d6f5f055ad37e7b104dbfb92afca69 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 21 Oct 2021 20:22:15 +0300 Subject: [PATCH 02/21] * test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys. (dabbrev-expand-test, dabbrev-completion-test) (dabbrev-completion-test-with-argument): Use 'kbd' to format keys for 'execute-kbd-macro'. (dabbrev-expand-test): Fix docstring. --- test/lisp/dabbrev-tests.el | 13 +++++-------- test/lisp/emacs-lisp/find-func-tests.el | 2 +- test/lisp/international/mule-tests.el | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/test/lisp/dabbrev-tests.el b/test/lisp/dabbrev-tests.el index e4b78373915..d3fe78b6185 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 28a9a7ecda3..987e4047d35 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 7727c118b2c..8ca1ade771d 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." From 2b7655ca0e36a3de40c0a94eed701277a12ba146 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 21 Oct 2021 21:09:03 +0300 Subject: [PATCH 03/21] ; More accurate doc string for 'tab-bar-format' * lisp/tab-bar.el (tab-bar-format): Make the doc string more accurate. (Bug#51247) --- lisp/tab-bar.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index a3316bf4496..10ff57bfd0a 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'), From ee6bdd6eef329434427c6a7b22613bd33249d00a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 21 Oct 2021 22:13:09 +0300 Subject: [PATCH 04/21] Fix non-interactive behavior of 'kill-region' * lisp/simple.el (kill-region): Actually ignore BEG and END when REGION is non-nil. Doc fix. (Bug#51320) --- lisp/simple.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index bec4aa4738e..4aa373d6701 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5285,11 +5285,12 @@ 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) + (unless (or region (and beg end)) (user-error "The mark is not set now, so there is no region")) (condition-case nil (let ((string (if region From 5bc522b4f45f17c44449a05df562d8f0ae00bcb4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 21 Oct 2021 22:29:37 +0300 Subject: [PATCH 05/21] ; * lisp/simple.el (kill-region): A better fix for bug#51320. --- lisp/simple.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 4aa373d6701..e3657cc079e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5289,9 +5289,12 @@ Supply two arguments, character positions BEG and END indicating the 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 (or region (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) From 9529e1d2fbec706dad9d126a8678bbfc6063ba79 Mon Sep 17 00:00:00 2001 From: Stephen Gildea Date: Thu, 21 Oct 2021 20:10:53 -0700 Subject: [PATCH 06/21] Update doc of Edebug specification for macros doc/lispref/edebug.texi: Update documentation of Edebug specification: - Do not document "0" as a recommended shortcut for non-instrumented arguments; nobody knows about nor uses this, so don't encourage it. - Add an example equivalent to (declare (debug (&rest sexp))). --- doc/lispref/edebug.texi | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 323130f2378..7d67cc3af11 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} From 2a0a368ddcd9b4eed067ddc114f3fb18b13bbe14 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 22 Oct 2021 05:28:21 +0200 Subject: [PATCH 07/21] Fix typo in doc/emacs/anti.texi * doc/emacs/anti.texi (Antinews): Fix typo. (Bug#51325) Reported by Po Lu . --- doc/emacs/anti.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/emacs/anti.texi b/doc/emacs/anti.texi index 354f20e757e..3b02187b5cb 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 From d2849cc645f349080fd74ffbe082178bc12cd02b Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Fri, 22 Oct 2021 10:16:17 +0200 Subject: [PATCH 08/21] Fix 'calculate-lisp-indent' when "[" starts containing sexp (Bug#51312) * lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Handle arbitrary paren syntax after skipping whitespace backwards within containing sexp (Bug#51312). --- lisp/emacs-lisp/lisp-mode.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index fc7a7362cd7..bb00a97f8e3 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1075,10 +1075,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))) From cf7d8fb1d77807ef4d77cfb0089fe371da454717 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 22 Oct 2021 10:22:08 +0200 Subject: [PATCH 09/21] Add description of cards to etc/refcards/README * etc/refcards/README: List all the generated reference cards, including their translations. (Bug#8932) --- etc/refcards/README | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/etc/refcards/README b/etc/refcards/README index 30c82bc7140..94bf7b1f0b0 100644 --- a/etc/refcards/README +++ b/etc/refcards/README @@ -23,6 +23,51 @@ PDF and PS copies of these cards are also available at . The FSF online store 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 From 24083c8d1330baf9ceda16b79ee3d285b7156023 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 21 Oct 2021 15:53:35 +0200 Subject: [PATCH 10/21] * lisp/net/eww.el (eww-retrieve-command): Add :tag. --- lisp/net/eww.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index bb6583c2a9a..238900db0c3 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\\)" @@ -1901,7 +1901,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))) From caf87d80fa07234d96cb747eb4d415f8a223db43 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 21 Oct 2021 16:22:48 +0200 Subject: [PATCH 11/21] * lisp/repeat.el (repeat-keep-prefix): Expand description. --- lisp/repeat.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/repeat.el b/lisp/repeat.el index 42590b7e6d9..b875b749b64 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") From 9c37b812da17078f218d8f6351333108020114a3 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Oct 2021 12:15:06 +0200 Subject: [PATCH 12/21] ; * lisp/repeat.el (repeat-mode): Fix docstring typo. --- lisp/repeat.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/repeat.el b/lisp/repeat.el index b875b749b64..ac08952eaa8 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -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) From 9b46150ab04f33514561d0589f9c37eae58bea23 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Oct 2021 12:16:34 +0200 Subject: [PATCH 13/21] * etc/NEWS: Improve 'repeat-mode' entry. --- etc/NEWS | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 4caf81d1681..5b6e2676c84 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3225,16 +3225,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'. From 1f6cdeb12c3cb8a86159cae9bfd638d8139c123e Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 22 Oct 2021 16:38:11 +0200 Subject: [PATCH 14/21] Ensure valid end/beginning lines in message-mark-inserted-region * lisp/gnus/message.el (message-mark-inserted-region): Ensure there's a newline before inserting the end line (bug#51324). --- lisp/gnus/message.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index d460f9bd922..bbf1c78a01f 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)))) From 9b6b5e37ef9106d9d77cf4785dc61feef531b8cf Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 22 Oct 2021 16:57:04 +0200 Subject: [PATCH 15/21] Regexp-quote github domains in bug-reference * lisp/progmodes/bug-reference.el (bug-reference--build-forge-setup-entry): Regexp-quote the domain (bug#51316). --- lisp/progmodes/bug-reference.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index fd435eadfe8..d7b12db2211 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))) From 06c944cff1a8a348b9c01a92891bd12576c0896d Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Fri, 22 Oct 2021 17:07:56 +0200 Subject: [PATCH 16/21] Fix rfc6068-parse-mailto-url autoload * lisp/net/browse-url.el (rfc6068-parse-mailto-url): Fix autoload cookie (bug#51333). --- lisp/net/browse-url.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index b21c66ef14b..3af37e412d9 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) From efde024361456b97277120b29d663d79ea5b287c Mon Sep 17 00:00:00 2001 From: Stephen Gildea Date: Fri, 22 Oct 2021 08:38:17 -0700 Subject: [PATCH 17/21] time-stamp-tests: improvements to test macros test/lisp/time-stamp-tests.el: Update macro declarations. (formatz-generate-tests): Don't nconc onto a constant list. Tests now run 12% faster in batch mode. --- test/lisp/time-stamp-tests.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el index 0449704b418..fa9edcbd407 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 From 168665da59e657a7b1826d745d16a08930d5b7e2 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Oct 2021 17:42:57 +0200 Subject: [PATCH 18/21] Move some xwidget entries * etc/NEWS: Move xwidget entries to correct location. --- etc/NEWS | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 5b6e2676c84..6a296fd8809 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2970,6 +2970,18 @@ user-visible changes in ERC. (return the current title), and 'xwidget-webkit-goto-history' (goto a 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 @@ -4519,18 +4531,6 @@ If Emacs was built with xwidget support, you can access the embedded 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 From 5ecbed01b2a53d10d11996003896c685f8e5f41b Mon Sep 17 00:00:00 2001 From: Stephen Gildea Date: Fri, 22 Oct 2021 08:45:57 -0700 Subject: [PATCH 19/21] ; * test/lisp/mh-e/mh-utils-tests.el: Update macro declarations. --- test/lisp/mh-e/mh-utils-tests.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/lisp/mh-e/mh-utils-tests.el b/test/lisp/mh-e/mh-utils-tests.el index a10c29fcf71..ed979232a41 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)))) From 7fde84e881b98f6f06d659acbb739bf185f8d764 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Oct 2021 17:51:56 +0200 Subject: [PATCH 20/21] Improve documentation of syntax-ppss-context slightly * doc/lispref/syntax.texi (Parser State): Document all possible return values from 'syntax-ppss-context'. --- doc/lispref/syntax.texi | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index deec3f44c08..87ade73c2ae 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 From b0d64be0bc581958bf3a74152a2cd10172916b03 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 22 Oct 2021 18:03:00 +0200 Subject: [PATCH 21/21] Improve some NEWS entries * etc/NEWS: Improve some NEWS entries. --- etc/NEWS | 102 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 47 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 6a296fd8809..4942a35b7ba 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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 '-9' key is -bound to 'tab-last', and switches to the last tab. Here 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 '-9' key +is bound to 'tab-last', and switches to the last tab. Here +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'. @@ -2358,14 +2364,6 @@ current environment. 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 @@ -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. @@ -3204,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. @@ -3703,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. @@ -3714,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. @@ -4446,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. @@ -4464,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'.