* src/xdisp.c (clear_message): Don't clear echo-area if
'inhibit-message' is non-nil.
* etc/NEWS:
* doc/lispref/display.texi (Displaying Messages): Document the
above change. (Bug#77257)
(cherry picked from commit
b0d6fe1449fbd32c01d69174f552d6884337a809)
@defvar inhibit-message
When this variable is non-@code{nil}, @code{message} and related functions
-will not display any messages in the Echo Area. Echo-area messages
-are still logged in the @file{*Messages*} buffer, though.
+will not display any messages in the Echo Area, and will also not clear
+previous echo-area messages when @code{message} is called with a
+@code{nil} or an empty argument. Echo-area messages are still logged in
+the @file{*Messages*} buffer, though.
@end defvar
@defmac with-temp-message message &rest body
{
Lisp_Object preserve = Qnil;
- if (current_p)
+ if (current_p && !inhibit_message)
{
if (FUNCTIONP (Vclear_message_function)
/* FIXME: (bug#63253) Same as for `set-message-function` above. */