aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-04-13 10:44:55 +0300
committerEli Zaretskii2025-04-13 10:44:55 +0300
commitb0d6fe1449fbd32c01d69174f552d6884337a809 (patch)
tree3b43d8b5ff40b445509e49cada414efcdf3493dc
parent7b36d7295e1567f5a1b3725ddbc3a7e85079660c (diff)
downloademacs-b0d6fe1449fbd32c01d69174f552d6884337a809.tar.gz
emacs-b0d6fe1449fbd32c01d69174f552d6884337a809.zip
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)
-rw-r--r--doc/lispref/display.texi6
-rw-r--r--etc/NEWS6
-rw-r--r--src/xdisp.c2
3 files changed, 11 insertions, 3 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 55c6206cf4d..3b48cb93405 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -404,8 +404,10 @@ elapsed since the time the first message was emitted.
404 404
405@defvar inhibit-message 405@defvar inhibit-message
406When this variable is non-@code{nil}, @code{message} and related functions 406When this variable is non-@code{nil}, @code{message} and related functions
407will not display any messages in the Echo Area. Echo-area messages 407will not display any messages in the Echo Area, and will also not clear
408are still logged in the @file{*Messages*} buffer, though. 408previous echo-area messages when @code{message} is called with a
409@code{nil} or an empty argument. Echo-area messages are still logged in
410the @file{*Messages*} buffer, though.
409@end defvar 411@end defvar
410 412
411@defmac with-temp-message message &rest body 413@defmac with-temp-message message &rest body
diff --git a/etc/NEWS b/etc/NEWS
index b3fca97ce7f..ea664e18bbe 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2154,6 +2154,12 @@ provide instructions for finding the definition.
2154New convenience function 'find-function-update-type-alist' offers a 2154New convenience function 'find-function-update-type-alist' offers a
2155concise way to update a symbol's 'find-function-type-alist' property. 2155concise way to update a symbol's 'find-function-type-alist' property.
2156 2156
2157+++
2158** 'inhibit-message' can now inhibit clearing of the echo-area.
2159Binding 'inhibit-message' to a non-nil value will now suppress both
2160the display of messages and the clearing of the echo-area, such as
2161caused by calling 'message' with a nil argument.
2162
2157** Special Events 2163** Special Events
2158 2164
2159+++ 2165+++
diff --git a/src/xdisp.c b/src/xdisp.c
index 4a0ea5778ba..dedd4bcaeea 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13405,7 +13405,7 @@ clear_message (bool current_p, bool last_displayed_p)
13405{ 13405{
13406 Lisp_Object preserve = Qnil; 13406 Lisp_Object preserve = Qnil;
13407 13407
13408 if (current_p) 13408 if (current_p && !inhibit_message)
13409 { 13409 {
13410 if (FUNCTIONP (Vclear_message_function) 13410 if (FUNCTIONP (Vclear_message_function)
13411 /* FIXME: (bug#63253) Same as for `set-message-function` above. */ 13411 /* FIXME: (bug#63253) Same as for `set-message-function` above. */