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". diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index e365e691096..b11e61a40fe 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -1208,7 +1208,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 diff --git a/lisp/dired.el b/lisp/dired.el index c00ae0fde7d..63d373a63dc 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -518,10 +518,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") @@ -2925,7 +2929,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)) @@ -2937,7 +2941,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. @@ -2946,9 +2951,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. (decf arg moving-down)) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index c57bd0a69e2..c8cee72025f 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