From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/delayed-warnings.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 devdocs/elisp/delayed-warnings.html (limited to 'devdocs/elisp/delayed-warnings.html') diff --git a/devdocs/elisp/delayed-warnings.html b/devdocs/elisp/delayed-warnings.html new file mode 100644 index 00000000..0fecd518 --- /dev/null +++ b/devdocs/elisp/delayed-warnings.html @@ -0,0 +1,20 @@ +

Delayed Warnings

Sometimes, you may wish to avoid showing a warning while a command is running, and only show it only after the end of the command. You can use the function delay-warning for this.

Function: delay-warning type message &optional level buffer-name +

This function is the delayed counterpart to display-warning (see Warning Basics), and it is called with the same arguments. The warning message is queued into delayed-warnings-list.

+
Variable: delayed-warnings-list +
+

The value of this variable is a list of warnings to be displayed after the current command has finished. Each element must be a list

(type message [level [buffer-name]])
+
+

with the same form, and the same meanings, as the argument list of display-warning. Immediately after running post-command-hook (see Command Overview), the Emacs command loop displays all the warnings specified by this variable, then resets it to nil.

+
+

Programs which need to further customize the delayed warnings mechanism can change the variable delayed-warnings-hook:

Variable: delayed-warnings-hook +
+

This is a normal hook which is run by the Emacs command loop, after post-command-hook, in order to process and display delayed warnings.

Its default value is a list of two functions:

(collapse-delayed-warnings display-delayed-warnings)
+
+

The function collapse-delayed-warnings removes repeated entries from delayed-warnings-list. The function display-delayed-warnings calls display-warning on each of the entries in delayed-warnings-list, in turn, and then sets delayed-warnings-list to nil.

+
+
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Delayed-Warnings.html +

+
-- cgit v1.2.3