1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Merge from origin/emacs-30

6d35c807e5 ; Improve documentation of globalized minor modes
704fab0452 ; Improve documentation of handling errors
307f465f7b ; * doc/lispref/text.texi (Suspicious Text): Fix suspicio...
6bedbafc7a ; * doc/lispref/text.texi (Suspicious Text): Indexing fix.
This commit is contained in:
Eli Zaretskii 2025-09-27 05:56:48 -04:00
commit 48fc9f67b7
3 changed files with 25 additions and 6 deletions

View file

@ -2181,7 +2181,8 @@ concept of continuable errors.
@subsubsection How Emacs Processes Errors @subsubsection How Emacs Processes Errors
@cindex processing of errors @cindex processing of errors
When an error is signaled, @code{signal} searches for an active When a Lisp program signals an error, it calls the function
@code{signal}, which searches for an active
@dfn{handler} for the error. A handler is a sequence of Lisp @dfn{handler} for the error. A handler is a sequence of Lisp
expressions designated to be executed if an error happens in part of the expressions designated to be executed if an error happens in part of the
Lisp program. If the error has an applicable handler, the handler is Lisp program. If the error has an applicable handler, the handler is
@ -2191,9 +2192,16 @@ established it; all functions called within that @code{condition-case}
have already been exited, and the handler cannot return to them. have already been exited, and the handler cannot return to them.
If there is no applicable handler for the error, it terminates the If there is no applicable handler for the error, it terminates the
current command and returns control to the editor command loop. (The current command, flushes all pending unprocessed input events
command loop has an implicit handler for all kinds of errors.) The (@pxref{Input Events})@footnote{
command loop's handler uses the error symbol and associated data to Pending input is discarded because the user could have typed something
in advance under the assumption that execution will proceed without
errors, so keeping these input events would cause unintended
consequences, like inserting stray characters into an unrelated buffer
or execution of some unintended command.
}, and returns control to the editor command loop.
(The command loop has an implicit handler for all kinds of errors.) The
command loop's handler then uses the error symbol and associated data to
print an error message. You can use the variable print an error message. You can use the variable
@code{command-error-function} to control how this is done: @code{command-error-function} to control how this is done:

View file

@ -1868,7 +1868,17 @@ marking the @code{define-minor-mode} form as autoloaded.
@item :init-value @var{init-value} @item :init-value @var{init-value}
This is the value to which the @var{mode} variable is initialized. This is the value to which the @var{mode} variable is initialized.
Except in unusual circumstances (see below), this value must be Except in unusual circumstances (see below), this value must be
@code{nil}. @code{nil}. If the mode is global (see below), and the initial value is
@code{t}, i.e., the mode is turned on by default, you should consider
forcing Emacs to run the mode function at startup, like this:
@lisp
:initialize #'custom-initialize-delay
@end lisp
@noindent
otherwise, the minor mode might not appear in the @file{*Help*} buffer
generated by @kbd{C-h m} (@pxref{Mode Help}).
@item :lighter @var{lighter} @item :lighter @var{lighter}
The string @var{lighter} says what to display in the mode line The string @var{lighter} says what to display in the mode line

View file

@ -5110,6 +5110,7 @@ having an @acronym{HTML} link text that says one thing, while the
underlying @acronym{URL} points somewhere else. underlying @acronym{URL} points somewhere else.
@cindex suspicious text strings @cindex suspicious text strings
@cindex confusable characters
To help identify these @dfn{suspicious text strings}, Emacs provides a To help identify these @dfn{suspicious text strings}, Emacs provides a
library to do a number of checks on text. (See library to do a number of checks on text. (See
@url{https://www.unicode.org/reports/tr39/, UTS #39: Unicode Security @url{https://www.unicode.org/reports/tr39/, UTS #39: Unicode Security
@ -5160,7 +5161,7 @@ suspicious. @var{object} should be a string.
@item email-address-header @item email-address-header
Check whether a full RFC2822 email address header (e.g., Check whether a full RFC2822 email address header (e.g.,
@samp{=?utf-8?Q?=C3=81?= <foo@@example.com>}) looks suspicious. @samp{=?utf-8?Q?=E2=84=AB?= <foo@@example.com>}) looks suspicious.
@var{object} should be a string. @var{object} should be a string.
@end table @end table