Merge from origin/emacs-30
0c32f7521b
; * admin/notes/spelling: More precisely qualify saying j...bc51fabc10
Add a choice to 'dired-movement-style' to restore the pre...10d534023a
; Fix some markup in doc/lispref/commands.texi.c2c287b325
Improve docstring of should-error
This commit is contained in:
commit
0cfe700e33
4 changed files with 32 additions and 16 deletions
|
@ -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".
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue