diff options
| author | Sean Whitton | 2025-03-24 10:41:45 +0800 |
|---|---|---|
| committer | Sean Whitton | 2025-03-24 10:41:45 +0800 |
| commit | 0cfe700e336da3cc5a2a766840d375921dcd5ee9 (patch) | |
| tree | e00f11c665f6b12e78302d60356fdf6538604bfe | |
| parent | a0864880d85e048ed7b1fddec9fc34298287a7e1 (diff) | |
| parent | 0c32f7521b12c13ac0c7fff09981054e106989c6 (diff) | |
| download | emacs-0cfe700e336da3cc5a2a766840d375921dcd5ee9.tar.gz emacs-0cfe700e336da3cc5a2a766840d375921dcd5ee9.zip | |
Merge from origin/emacs-30
0c32f7521b1 ; * admin/notes/spelling: More precisely qualify saying j...
bc51fabc108 Add a choice to 'dired-movement-style' to restore the pre...
10d534023a9 ; Fix some markup in doc/lispref/commands.texi.
c2c287b3252 Improve docstring of should-error
| -rw-r--r-- | admin/notes/spelling | 3 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 2 | ||||
| -rw-r--r-- | lisp/dired.el | 18 | ||||
| -rw-r--r-- | lisp/emacs-lisp/ert.el | 27 |
4 files changed, 33 insertions, 17 deletions
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. | |||
| 18 | 18 | ||
| 19 | - In comments, docstrings and other documentation that forms part of | 19 | - In comments, docstrings and other documentation that forms part of |
| 20 | Emacs itself, prefer not to abbreviate "Emacs Lisp". | 20 | Emacs itself, prefer not to abbreviate "Emacs Lisp". |
| 21 | Say just "Lisp" whenever the context allows. | 21 | In docstrings and the Texinfo manuals, say just "Lisp" whenever the |
| 22 | context renders it unambiguous that you mean "Emacs Lisp". | ||
| 22 | If you must abbreviate "Emacs Lisp", capitalize it thus: "Elisp". | 23 | 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}. | |||
| 1208 | @cindex input devices | 1208 | @cindex input devices |
| 1209 | @cindex device names | 1209 | @cindex device names |
| 1210 | Input events must come from somewhere; sometimes, that is a keyboard | 1210 | Input events must come from somewhere; sometimes, that is a keyboard |
| 1211 | macro, a signal, or `unread-command-events', but it is usually a | 1211 | macro, a signal, or @code{unread-command-events}, but it is usually a |
| 1212 | physical input device connected to a computer that is controlled by | 1212 | physical input device connected to a computer that is controlled by |
| 1213 | the user. Those devices are referred to as @dfn{input devices}, and | 1213 | the user. Those devices are referred to as @dfn{input devices}, and |
| 1214 | Emacs associates each input event with the input device from which it | 1214 | 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: | |||
| 518 | to the first/last visible line. | 518 | to the first/last visible line. |
| 519 | * `bounded': don't move up/down if the current line is the | 519 | * `bounded': don't move up/down if the current line is the |
| 520 | first/last visible line. | 520 | first/last visible line. |
| 521 | * `cycle-files': like `cycle' but moves only over file lines. | ||
| 522 | * `bounded-files': like `bounded' but moves only over file lines. | ||
| 521 | Any other non-nil value is treated as `bounded'." | 523 | Any other non-nil value is treated as `bounded'." |
| 522 | :type '(choice (const :tag "Move to any line" nil) | 524 | :type '(choice (const :tag "Move to any line" nil) |
| 523 | (const :tag "Cycle through non-empty lines" cycle) | 525 | (const :tag "Cycle through non-empty lines" cycle) |
| 524 | (const :tag "Stop on last/first non-empty line" bounded)) | 526 | (const :tag "Cycle through file lines" cycle-files) |
| 527 | (const :tag "Stop on last/first non-empty line" bounded) | ||
| 528 | (const :tag "Stop on last/first file line" bounded-files)) | ||
| 525 | :group 'dired | 529 | :group 'dired |
| 526 | :version "30.1") | 530 | :version "30.1") |
| 527 | 531 | ||
| @@ -2925,7 +2929,7 @@ is controlled by `dired-movement-style'." | |||
| 2925 | ;; but it still wants to move farther. | 2929 | ;; but it still wants to move farther. |
| 2926 | (cond | 2930 | (cond |
| 2927 | ;; `cycle': go to the other end. | 2931 | ;; `cycle': go to the other end. |
| 2928 | ((eq dired-movement-style 'cycle) | 2932 | ((memq dired-movement-style '(cycle cycle-files)) |
| 2929 | ;; Argument not changing on the second wrap | 2933 | ;; Argument not changing on the second wrap |
| 2930 | ;; means infinite loop with no files found. | 2934 | ;; means infinite loop with no files found. |
| 2931 | (if (and wrapped (eq old-arg arg)) | 2935 | (if (and wrapped (eq old-arg arg)) |
| @@ -2937,7 +2941,8 @@ is controlled by `dired-movement-style'." | |||
| 2937 | ;; `bounded': go back to the last non-empty line. | 2941 | ;; `bounded': go back to the last non-empty line. |
| 2938 | (dired-movement-style ; Either 'bounded or anything else non-nil. | 2942 | (dired-movement-style ; Either 'bounded or anything else non-nil. |
| 2939 | (while (and (dired-between-files) | 2943 | (while (and (dired-between-files) |
| 2940 | (not (dired-get-subdir)) | 2944 | (or (eq dired-movement-style 'bounded-files) |
| 2945 | (not (dired-get-subdir))) | ||
| 2941 | (not (zerop arg))) | 2946 | (not (zerop arg))) |
| 2942 | (funcall jumpfun (- moving-down)) | 2947 | (funcall jumpfun (- moving-down)) |
| 2943 | ;; Point not moving means infinite loop. | 2948 | ;; Point not moving means infinite loop. |
| @@ -2946,9 +2951,12 @@ is controlled by `dired-movement-style'." | |||
| 2946 | (setq old-position (point)))) | 2951 | (setq old-position (point)))) |
| 2947 | ;; Encountered a boundary, so let's stop movement. | 2952 | ;; Encountered a boundary, so let's stop movement. |
| 2948 | (setq arg (if (and (dired-between-files) | 2953 | (setq arg (if (and (dired-between-files) |
| 2949 | (not (dired-get-subdir))) | 2954 | (or (eq dired-movement-style 'bounded-files) |
| 2955 | (not (dired-get-subdir)))) | ||
| 2950 | 0 moving-down))))) | 2956 | 0 moving-down))))) |
| 2951 | (unless (and (dired-between-files) (not (dired-get-subdir))) | 2957 | (unless (and (dired-between-files) |
| 2958 | (or (memq dired-movement-style '(cycle-files bounded-files)) | ||
| 2959 | (not (dired-get-subdir)))) | ||
| 2952 | ;; Has moved to a non-empty line. This movement does | 2960 | ;; Has moved to a non-empty line. This movement does |
| 2953 | ;; make sense. | 2961 | ;; make sense. |
| 2954 | (decf arg moving-down)) | 2962 | (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." | |||
| 422 | (cl-defmacro should-error (form &rest keys &key type exclude-subtypes) | 422 | (cl-defmacro should-error (form &rest keys &key type exclude-subtypes) |
| 423 | "Evaluate FORM and check that it signals an error. | 423 | "Evaluate FORM and check that it signals an error. |
| 424 | 424 | ||
| 425 | The error signaled needs to match TYPE. TYPE should be a list | 425 | If no error was signaled, abort the test as failed and |
| 426 | of condition names. (It can also be a non-nil symbol, which is | 426 | return (ERROR-SYMBOL . DATA) from the error. |
| 427 | equivalent to a singleton list containing that symbol.) If | 427 | |
| 428 | EXCLUDE-SUBTYPES is nil, the error matches TYPE if one of its | 428 | You can also match specific errors using the KEYWORD-ARGS arguments, |
| 429 | condition names is an element of TYPE. If EXCLUDE-SUBTYPES is | 429 | which is specified as keyword/argument pairs. The following arguments |
| 430 | non-nil, the error matches TYPE if it is an element of TYPE. | 430 | are defined: |
| 431 | 431 | ||
| 432 | If the error matches, returns (ERROR-SYMBOL . DATA) from the | 432 | :type TYPE -- If TYPE is non-nil, the error signaled needs to match |
| 433 | error. If not, or if no error was signaled, abort the test as | 433 | TYPE. TYPE should be a list of condition names. It can also be a |
| 434 | failed." | 434 | symbol, which is equivalent to a one-element list containing that |
| 435 | symbol. | ||
| 436 | |||
| 437 | :exclude-subtypes EXCLUDED -- If EXCLUDED is non-nil, the error matches | ||
| 438 | TYPE only if it is an element of TYPE. If nil (the default), the error | ||
| 439 | matches TYPE if one of its condition names is an element of TYPE. | ||
| 440 | |||
| 441 | \(fn FORM &rest KEYWORD-ARGS)" | ||
| 435 | (declare (debug t)) | 442 | (declare (debug t)) |
| 436 | (unless type (setq type ''error)) | 443 | (unless type (setq type ''error)) |
| 437 | (ert--expand-should | 444 | (ert--expand-should |