summaryrefslogtreecommitdiff
path: root/doc/lispref/display.texi
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-04-04 15:54:02 +0800
committerChong Yidong <cyd@gnu.org>2012-04-04 15:54:02 +0800
commit3d439cd10fff3e71c7115263a03a5a92898ca7ea (patch)
treee79c2b0c1e66474429fec04614701d38c5bf52e7 /doc/lispref/display.texi
parent97f4a299ee49ed580beb079752bd4d0c9dee0ce7 (diff)
downloademacs-3d439cd10fff3e71c7115263a03a5a92898ca7ea.tar.gz
Several miscellaneous doc changes.
* doc/lispref/display.texi (Delayed Warnings): New node. * doc/misc/gnus-faq.texi (FAQ 8-2): Mention EasyPG. * doc/misc/gnus.texi: Reduce references to obsolete pgg library. (Security): Note that epg is now the default. * doc/misc/message.texi (Using PGP/MIME): Note that epg is now the default. * doc/misc/nxml-mode.texi (Completion): C-RET is no longer bound to nxml-complete. * lisp/subr.el (delayed-warnings-hook): Doc fix. * src/keyboard.c (Vdelayed_warnings_list): Doc fix.
Diffstat (limited to 'doc/lispref/display.texi')
-rw-r--r--doc/lispref/display.texi48
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 12b30dc599c..8382c2a1555 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -572,6 +572,7 @@ possible problem, but continue running.
* Warning Basics:: Warnings concepts and functions to report them.
* Warning Variables:: Variables programs bind to customize their warnings.
* Warning Options:: Variables users set to control display of warnings.
+* Delayed Warnings:: Deferring a warning until the end of a command.
@end menu
@node Warning Basics
@@ -750,6 +751,53 @@ symbols. If it matches the first few elements in a warning type, then
that warning is not logged.
@end defopt
+@node Delayed Warnings
+@subsection 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 variable @code{delayed-warnings-list} for this.
+
+@defvar 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
+
+@smallexample
+(@var{type} @var{message} [@var{level} [@var{buffer-name}]])
+@end smallexample
+
+@noindent
+with the same form, and the same meanings, as the argument list of
+@code{display-warning} (@pxref{Warning Basics}). Immediately after
+running @code{post-command-hook} (@pxref{Command Overview}), the Emacs
+command loop displays all the warnings specified by this variable,
+then resets it to @code{nil}.
+@end defvar
+
+ Programs which need to further customize the delayed warnings
+mechanism can change the variable @code{delayed-warnings-hook}:
+
+@defvar delayed-warnings-hook
+This is a normal hook which is run by the Emacs command loop, after
+@code{post-command-hook}, in order to to process and display delayed
+warnings.
+
+Its default value is a list of two functions:
+
+@smallexample
+(collapse-delayed-warnings display-delayed-warnings)
+@end smallexample
+
+@findex collapse-delayed-warnings
+@findex display-delayed-warnings
+@noindent
+The function @code{collapse-delayed-warnings} iterates through
+@code{delayed-warnings-list}, removing repeated entries. The function
+@code{display-delayed-warnings} calls @code{display-warning} on each
+of the entries in @code{delayed-warnings-list}, in turn, and then sets
+@code{delayed-warnings-list} to @code{nil}.
+@end defvar
+
@node Invisible Text
@section Invisible Text