aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJuri Linkov2019-12-22 00:02:10 +0200
committerJuri Linkov2019-12-22 00:02:10 +0200
commit485b423e8f0df2711a850be7f254665f64ab0bdb (patch)
tree02f294b4daa4ec7718769afe8235a7119b52bcb5 /doc
parent678a71ea2d044f19f75e3f45c930c5e3b707e3dc (diff)
downloademacs-485b423e8f0df2711a850be7f254665f64ab0bdb.tar.gz
emacs-485b423e8f0df2711a850be7f254665f64ab0bdb.zip
New variable set-message-function to show message at the end of the minibuffer
* doc/lispref/display.texi (Displaying Messages): Document set-message-function and clear-message-function. * lisp/minibuffer.el (minibuffer-message-clear-timeout): New defcustom. (minibuffer-message-timer, minibuffer-message-overlay): New variables. (set-minibuffer-message, clear-minibuffer-message): New functions. (set-message-function, clear-message-function): Set variables to set-minibuffer-message and clear-minibuffer-message respectively. * src/keyboard.c (read_char): Call clear_message when Vclear_message_function is a function. * src/xdisp.c (set_message): Call Vset_message_function when it's a function. (clear_message): Call Vclear_message_function when it's a function. (syms_of_xdisp): New variables set-message-function and clear-message-function (bug#38457).
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/display.texi29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 42b049eafde..0085f3b6750 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -306,6 +306,35 @@ reformatted, with undesirable results. Instead, use @code{(message
306"%s" @var{string})}. 306"%s" @var{string})}.
307@end defun 307@end defun
308 308
309@defvar set-message-function
310When this variable is non-@code{nil}, @code{message} and related functions
311call it as a function with one argument that is the message to show.
312
313When this function returns @code{nil}, the message is displayed in the
314echo area as usual. When the function returns a string, the returned
315string is displayed in the echo area. When this function returns
316other non-@code{nil} values, this means that the message was handled
317specially, so the same message is not displayed in the echo area.
318See also @code{clear-message-function} that can be used to clear the
319message displayed by this function.
320
321The default value is the function that displays the message at the end
322of the minibuffer when the minibuffer is active.
323@end defvar
324
325@defvar clear-message-function
326When this variable is non-@code{nil}, @code{message} and related functions
327call it without arguments when their message is @code{nil} or the empty string.
328
329Usually this function is called when the next input event arrives.
330The function is called without arguments. It is expected to clear the
331message displayed by its counterpart function specified by
332@code{set-message-function}.
333
334The default value is the function that clears the message displayed at
335the end of the minibuffer when the minibuffer is active.
336@end defvar
337
309@defvar inhibit-message 338@defvar inhibit-message
310When this variable is non-@code{nil}, @code{message} and related functions 339When this variable is non-@code{nil}, @code{message} and related functions
311will not use the Echo Area to display messages. 340will not use the Echo Area to display messages.