From c2c287b3252e2cd3223f2e2d0ef96f29e024b47b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 23 Mar 2025 17:40:22 +0100 Subject: [PATCH 1/4] Improve docstring of should-error * lisp/emacs-lisp/ert.el (should-error): Improve docstring. --- lisp/emacs-lisp/ert.el | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 02551bad31f..731e8d1a40a 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -422,16 +422,23 @@ and aborts the current test as failed if it doesn't." (cl-defmacro should-error (form &rest keys &key type exclude-subtypes) "Evaluate FORM and check that it signals an error. -The error signaled needs to match TYPE. TYPE should be a list -of condition names. (It can also be a non-nil symbol, which is -equivalent to a singleton list containing that symbol.) If -EXCLUDE-SUBTYPES is nil, the error matches TYPE if one of its -condition names is an element of TYPE. If EXCLUDE-SUBTYPES is -non-nil, the error matches TYPE if it is an element of TYPE. +If no error was signaled, abort the test as failed and +return (ERROR-SYMBOL . DATA) from the error. -If the error matches, returns (ERROR-SYMBOL . DATA) from the -error. If not, or if no error was signaled, abort the test as -failed." +You can also match specific errors using the KEYWORD-ARGS arguments, +which is specified as keyword/argument pairs. The following arguments +are defined: + +:type TYPE -- If TYPE is non-nil, the error signaled needs to match +TYPE. TYPE should be a list of condition names. It can also be a +symbol, which is equivalent to a one-element list containing that +symbol. + +:exclude-subtypes EXCLUDED -- If EXCLUDED is non-nil, the error matches +TYPE only if it is an element of TYPE. If nil (the default), the error +matches TYPE if one of its condition names is an element of TYPE. + +\(fn FORM &rest KEYWORD-ARGS)" (declare (debug t)) (unless type (setq type ''error)) (ert--expand-should From 10d534023a9aa1ffdfa0109f114630ff2eb9cf65 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 23 Mar 2025 18:13:52 +0100 Subject: [PATCH 2/4] ; Fix some markup in doc/lispref/commands.texi. --- doc/lispref/commands.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 506788340c8..fcd6dce3277 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -1209,7 +1209,7 @@ If the last event came from a keyboard macro, the value is @code{macro}. @cindex input devices @cindex device names Input events must come from somewhere; sometimes, that is a keyboard -macro, a signal, or `unread-command-events', but it is usually a +macro, a signal, or @code{unread-command-events}, but it is usually a physical input device connected to a computer that is controlled by the user. Those devices are referred to as @dfn{input devices}, and Emacs associates each input event with the input device from which it From bc51fabc108ceccd4824ba6c6f0c29f143ebf47a Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 23 Mar 2025 19:48:28 +0200 Subject: [PATCH 3/4] Add a choice to 'dired-movement-style' to restore the previous behavior * lisp/dired.el (dired-movement-style): Add new values 'bounded-files' and 'cycle-files' (bug#76596). (dired--move-to-next-line): Use new values for users who prefer the default behavior of Emacs 30.1. --- lisp/dired.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 17c8ba5f123..cbccc7537da 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -512,10 +512,14 @@ Possible non-nil values: to the first/last visible line. * `bounded': don't move up/down if the current line is the first/last visible line. + * `cycle-files': like `cycle' but moves only over file lines. + * `bounded-files': like `bounded' but moves only over file lines. Any other non-nil value is treated as `bounded'." :type '(choice (const :tag "Move to any line" nil) (const :tag "Cycle through non-empty lines" cycle) - (const :tag "Stop on last/first non-empty line" bounded)) + (const :tag "Cycle through file lines" cycle-files) + (const :tag "Stop on last/first non-empty line" bounded) + (const :tag "Stop on last/first file line" bounded-files)) :group 'dired :version "30.1") @@ -2877,7 +2881,7 @@ is controlled by `dired-movement-style'." ;; but it still wants to move farther. (cond ;; `cycle': go to the other end. - ((eq dired-movement-style 'cycle) + ((memq dired-movement-style '(cycle cycle-files)) ;; Argument not changing on the second wrap ;; means infinite loop with no files found. (if (and wrapped (eq old-arg arg)) @@ -2889,7 +2893,8 @@ is controlled by `dired-movement-style'." ;; `bounded': go back to the last non-empty line. (dired-movement-style ; Either 'bounded or anything else non-nil. (while (and (dired-between-files) - (not (dired-get-subdir)) + (or (eq dired-movement-style 'bounded-files) + (not (dired-get-subdir))) (not (zerop arg))) (funcall jumpfun (- moving-down)) ;; Point not moving means infinite loop. @@ -2898,9 +2903,12 @@ is controlled by `dired-movement-style'." (setq old-position (point)))) ;; Encountered a boundary, so let's stop movement. (setq arg (if (and (dired-between-files) - (not (dired-get-subdir))) + (or (eq dired-movement-style 'bounded-files) + (not (dired-get-subdir)))) 0 moving-down))))) - (unless (and (dired-between-files) (not (dired-get-subdir))) + (unless (and (dired-between-files) + (or (memq dired-movement-style '(cycle-files bounded-files)) + (not (dired-get-subdir)))) ;; Has moved to a non-empty line. This movement does ;; make sense. (cl-decf arg moving-down)) From 0c32f7521b12c13ac0c7fff09981054e106989c6 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 24 Mar 2025 10:40:09 +0800 Subject: [PATCH 4/4] ; * admin/notes/spelling: More precisely qualify saying just "Lisp" --- admin/notes/spelling | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/notes/spelling b/admin/notes/spelling index 37a0ada9923..5b09a19b0f0 100644 --- a/admin/notes/spelling +++ b/admin/notes/spelling @@ -18,5 +18,6 @@ Re "behavior" vs "behaviour", etc. - In comments, docstrings and other documentation that forms part of Emacs itself, prefer not to abbreviate "Emacs Lisp". - Say just "Lisp" whenever the context allows. + In docstrings and the Texinfo manuals, say just "Lisp" whenever the + context renders it unambiguous that you mean "Emacs Lisp". If you must abbreviate "Emacs Lisp", capitalize it thus: "Elisp".