diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-04-06 14:38:13 -0400 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-04-06 14:38:13 -0400 |
commit | 40860b61eed0dc60439d6a13cba4e4cdad36dc15 (patch) | |
tree | 537e3547c93731f69043289c1828b0f7594eb41d /doc | |
parent | c755463f0440224254c85b52c1168687383b7a7d (diff) | |
parent | b39c3cd1125590bf4b77880b41ac08b29cdfcff6 (diff) | |
download | emacs-40860b61eed0dc60439d6a13cba4e4cdad36dc15.tar.gz |
Merge from origin/emacs-29
b39c3cd1125 ; * etc/NEWS: Fix typos.
89ac5ba11c7 Fix ModelSim error regexp in vhdl-mode
24ed9c7ae78 ; * doc/emacs/trouble.texi (Checklist): Minor copyedits (...
d1d39a0f09c Document enhancements in handling of echo-area messages
# Conflicts:
# etc/NEWS
Diffstat (limited to 'doc')
-rw-r--r-- | doc/emacs/trouble.texi | 12 | ||||
-rw-r--r-- | doc/lispref/display.texi | 74 |
2 files changed, 65 insertions, 21 deletions
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index ded9d02cf54..0166c613144 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -856,7 +856,7 @@ customizations. @cindex dribble file @cindex logging keystrokes One way to record the input to Emacs precisely is to write a dribble -file. To start the file, use the @kbd{M-x open-dribble-file} command. +file. To start the file, use the command @w{@kbd{M-x open-dribble-file}}. From then on, Emacs copies all your input to the specified dribble file until the Emacs process is killed. Be aware that sensitive information (such as passwords) may end up recorded in the dribble @@ -1071,9 +1071,13 @@ backtrace for the error. To make a backtrace for the error, use say, you must give that command and then make the bug happen). This causes the error to start the Lisp debugger, which shows you a backtrace. Copy the text of the debugger's backtrace into the bug -report. @xref{Edebug,, Edebug, elisp, the Emacs Lisp Reference -Manual}, for information on debugging Emacs Lisp programs with the -Edebug package. +report. (The backtrace is more detailed if you load the relevant Lisp +@file{*.el} source files before triggering the error, so do that if +you know how to find and load those files.) + +To debug the error, we suggest to use Edebug. @xref{Edebug,, Edebug, +elisp, the Emacs Lisp Reference Manual}, for information on debugging +Emacs Lisp programs with the Edebug package. This use of the debugger is possible only if you know how to make the bug happen again. If you can't make it happen again, at least copy diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 550d711c73a..85fac4b30a6 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -310,29 +310,29 @@ reformatted, with undesirable results. Instead, use @code{(message "%s" @var{string})}. @end defun +The following facilities allow users and Lisp programs to control how +echo-area messages are displayed. + @defvar set-message-function If this variable is non-@code{nil}, it should be a function of one -argument, the text of a message to display in the echo area. This +argument, the text of a message to display in the echo area. That function will be called by @code{message} and related functions. If the function returns @code{nil}, the message is displayed in the echo -area as usual. If this function returns a string, that string is -displayed in the echo area instead of the original one. If this -function returns other non-@code{nil} values, that means the message -was already handled, so @code{message} will not display anything in -the echo area. See also @code{clear-message-function} that can be -used to clear the message displayed by this function. - -The default value is the function that displays the message at the end -of the minibuffer when the minibuffer is active. However, if the text -shown in the active minibuffer has the @code{minibuffer-message} text -property (@pxref{Special Properties}) on some character, the message -will be displayed before the first character having that property. +area as usual. If the function returns a string, that string is +displayed in the echo area @emph{instead} of the original message. If +the function returns any other non-@code{nil} value, that means the +message was already handled, so @code{message} will not display +anything in the echo area. + +The default value calls @code{set-minibuffer-message}, described +below. @end defvar @defvar clear-message-function -If this variable is non-@code{nil}, @code{message} and related -functions call it with no arguments when their argument message is -@code{nil} or the empty string. +If this variable is non-@code{nil}, it should be a function of no +arguments; @code{message} and related functions call it when their +argument message is @code{nil} or the empty string, to clear the echo +area. Usually this function is called when the next input event arrives after displaying an echo-area message. The function is expected to @@ -358,11 +358,51 @@ with the same text; if the last function in the list returns function returns a non-@code{nil} value that is not a string, the message is considered to be handled, and no further functions in the list are called. + +The three useful functions to be put in the list that is the value of +this option are described below. @end defopt +@defun set-minibuffer-message message +This function displays @var{message} in the echo-area when the +minibuffer is not active, and at the end of the minibuffer when the +minibuffer is active. However, if the text shown in the active +minibuffer has the @code{minibuffer-message} text property +(@pxref{Special Properties}) on some character, the message will be +displayed before the first character having that property. + +This function is by default the only member of the list in +@code{set-message-functions}. +@end defun + +@vindex inhibit-message-regexps +@defun inhibit-message message +If an echo-area @var{message} matches any regexp in the list that is +the value of the user option @code{inhibit-message-regexps}, this +function suppresses the display of that message and returns a +non-@code{nil} value that is not a string. Thus, if this function is +in the list @code{set-message-functions}, the rest of the functions in +the list will not be called when @var{message} matches the regexps in +@code{inhibit-message-regexps}. To ensure a matching @var{message} +will never be displayed, make this function be the first element of +the list in @code{set-message-functions}. +@end defun + +@vindex multi-message-max +@vindex multi-message-timeout +@defun set-multi-message message +This function accumulates several echo-area messages emitted one after +another, and returns them as a single string in which individual +messages are separated by newlines. Up to @code{multi-message-max} +recent messages can be accumulated. The accumulated messages are +discarded when more than @code{multi-message-timeout} seconds have +elapsed since the time the first message was emitted. +@end defun + @defvar inhibit-message When this variable is non-@code{nil}, @code{message} and related functions -will not use the Echo Area to display messages. +will not display any messages in the Echo Area. Echo-area messages +are still logged in the @file{*Messages*} buffer, though. @end defvar @defmac with-temp-message message &rest body |