Disable clearing echo-area when 'inhibit-message' is non-nil
* 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)
This commit is contained in:
parent
7b36d7295e
commit
b0d6fe1449
3 changed files with 11 additions and 3 deletions
|
@ -404,8 +404,10 @@ elapsed since the time the first message was emitted.
|
||||||
|
|
||||||
@defvar inhibit-message
|
@defvar inhibit-message
|
||||||
When this variable is non-@code{nil}, @code{message} and related functions
|
When this variable is non-@code{nil}, @code{message} and related functions
|
||||||
will not display any messages in the Echo Area. Echo-area messages
|
will not display any messages in the Echo Area, and will also not clear
|
||||||
are still logged in the @file{*Messages*} buffer, though.
|
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
|
@end defvar
|
||||||
|
|
||||||
@defmac with-temp-message message &rest body
|
@defmac with-temp-message message &rest body
|
||||||
|
|
6
etc/NEWS
6
etc/NEWS
|
@ -2154,6 +2154,12 @@ provide instructions for finding the definition.
|
||||||
New convenience function 'find-function-update-type-alist' offers a
|
New convenience function 'find-function-update-type-alist' offers a
|
||||||
concise way to update a symbol's 'find-function-type-alist' property.
|
concise way to update a symbol's 'find-function-type-alist' property.
|
||||||
|
|
||||||
|
+++
|
||||||
|
** 'inhibit-message' can now inhibit clearing of the echo-area.
|
||||||
|
Binding 'inhibit-message' to a non-nil value will now suppress both
|
||||||
|
the display of messages and the clearing of the echo-area, such as
|
||||||
|
caused by calling 'message' with a nil argument.
|
||||||
|
|
||||||
** Special Events
|
** Special Events
|
||||||
|
|
||||||
+++
|
+++
|
||||||
|
|
|
@ -13405,7 +13405,7 @@ clear_message (bool current_p, bool last_displayed_p)
|
||||||
{
|
{
|
||||||
Lisp_Object preserve = Qnil;
|
Lisp_Object preserve = Qnil;
|
||||||
|
|
||||||
if (current_p)
|
if (current_p && !inhibit_message)
|
||||||
{
|
{
|
||||||
if (FUNCTIONP (Vclear_message_function)
|
if (FUNCTIONP (Vclear_message_function)
|
||||||
/* FIXME: (bug#63253) Same as for `set-message-function` above. */
|
/* FIXME: (bug#63253) Same as for `set-message-function` above. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue