Previous: Warning Options, Up: 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 variable delayed-warnings-list
for this.
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
(see Warning Basics). Immediately after runningpost-command-hook
(see Command Overview), the Emacs command loop displays all the warnings specified by this variable, then resets it tonil
.
Programs which need to further customize the delayed warnings
mechanism can change the 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 fromdelayed-warnings-list
. The functiondisplay-delayed-warnings
callsdisplay-warning
on each of the entries indelayed-warnings-list
, in turn, and then setsdelayed-warnings-list
tonil
.