diff options
| -rw-r--r-- | doc/lispref/display.texi | 31 | ||||
| -rw-r--r-- | etc/NEWS | 7 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 16 |
4 files changed, 33 insertions, 28 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 0085f3b6750..6952cb58130 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -307,28 +307,29 @@ reformatted, with undesirable results. Instead, use @code{(message | |||
| 307 | @end defun | 307 | @end defun |
| 308 | 308 | ||
| 309 | @defvar set-message-function | 309 | @defvar set-message-function |
| 310 | When this variable is non-@code{nil}, @code{message} and related functions | 310 | If this variable is non-@code{nil}, it should be a function of one |
| 311 | call it as a function with one argument that is the message to show. | 311 | argument, the text of a message to display in the echo area. This |
| 312 | 312 | function will be called by @code{message} and related functions. If | |
| 313 | When this function returns @code{nil}, the message is displayed in the | 313 | the function returns @code{nil}, the message is displayed in the echo |
| 314 | echo area as usual. When the function returns a string, the returned | 314 | area as usual. If this function returns a string, that string is |
| 315 | string is displayed in the echo area. When this function returns | 315 | displayed in the echo area instead of the original one. If this |
| 316 | other non-@code{nil} values, this means that the message was handled | 316 | function returns other non-@code{nil} values, that means the message |
| 317 | specially, so the same message is not displayed in the echo area. | 317 | was already handled, so @code{message} will not display anything in |
| 318 | See also @code{clear-message-function} that can be used to clear the | 318 | the echo area. See also @code{clear-message-function} that can be |
| 319 | message displayed by this function. | 319 | used to clear the message displayed by this function. |
| 320 | 320 | ||
| 321 | The default value is the function that displays the message at the end | 321 | The default value is the function that displays the message at the end |
| 322 | of the minibuffer when the minibuffer is active. | 322 | of the minibuffer when the minibuffer is active. |
| 323 | @end defvar | 323 | @end defvar |
| 324 | 324 | ||
| 325 | @defvar clear-message-function | 325 | @defvar clear-message-function |
| 326 | When this variable is non-@code{nil}, @code{message} and related functions | 326 | If this variable is non-@code{nil}, @code{message} and related |
| 327 | call it without arguments when their message is @code{nil} or the empty string. | 327 | functions call it with no arguments when their argument message is |
| 328 | @code{nil} or the empty string. | ||
| 328 | 329 | ||
| 329 | Usually this function is called when the next input event arrives. | 330 | Usually this function is called when the next input event arrives |
| 330 | The function is called without arguments. It is expected to clear the | 331 | after displaying an echo-area message. The function is expected to |
| 331 | message displayed by its counterpart function specified by | 332 | clear the message displayed by its counterpart function specified by |
| 332 | @code{set-message-function}. | 333 | @code{set-message-function}. |
| 333 | 334 | ||
| 334 | The default value is the function that clears the message displayed at | 335 | The default value is the function that clears the message displayed at |
| @@ -782,8 +782,11 @@ the minibuffer. If non-nil, point will move to the end of the prompt | |||
| 782 | (if point is after the end of the prompt). | 782 | (if point is after the end of the prompt). |
| 783 | 783 | ||
| 784 | +++ | 784 | +++ |
| 785 | *** When the minibuffer is active, messages are displayed at the end of | 785 | *** When the minibuffer is active, echo-area messages are displayed at |
| 786 | the minibuffer instead of overwriting the minibuffer by the echo area. | 786 | the end of the minibuffer instead of hiding the minibuffer by the echo |
| 787 | area display. The new option 'minibuffer-message-clear-timeout' | ||
| 788 | controls how messages displayed in this situation are removed from the | ||
| 789 | minibuffer. | ||
| 787 | 790 | ||
| 788 | --- | 791 | --- |
| 789 | *** Minibuffer now uses 'minibuffer-message' to display error messages | 792 | *** Minibuffer now uses 'minibuffer-message' to display error messages |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 96931162cc1..c0df383e288 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -748,9 +748,10 @@ If ARGS are provided, then pass MESSAGE through `format-message'." | |||
| 748 | 748 | ||
| 749 | (defcustom minibuffer-message-clear-timeout nil | 749 | (defcustom minibuffer-message-clear-timeout nil |
| 750 | "How long to display an echo-area message when the minibuffer is active. | 750 | "How long to display an echo-area message when the minibuffer is active. |
| 751 | If the value is a number, it should be specified in seconds. | 751 | If the value is a number, it is the time in seconds after which to |
| 752 | If the value is not a number, such messages never time out, | 752 | remove the echo-area message from the active minibuffer. |
| 753 | and the text is displayed until the next input event arrives. | 753 | If the value is not a number, such messages are never removed, |
| 754 | and their text is displayed until the next input event arrives. | ||
| 754 | Unlike `minibuffer-message-timeout' used by `minibuffer-message', | 755 | Unlike `minibuffer-message-timeout' used by `minibuffer-message', |
| 755 | this option affects the pair of functions `set-minibuffer-message' | 756 | this option affects the pair of functions `set-minibuffer-message' |
| 756 | and `clear-minibuffer-message' called automatically via | 757 | and `clear-minibuffer-message' called automatically via |
diff --git a/src/xdisp.c b/src/xdisp.c index 8cba5c5028d..2dfc4cbfeb4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -34968,19 +34968,19 @@ display table takes effect; in this case, Emacs does not consult | |||
| 34968 | Vdebug_on_message = Qnil; | 34968 | Vdebug_on_message = Qnil; |
| 34969 | 34969 | ||
| 34970 | DEFVAR_LISP ("set-message-function", Vset_message_function, | 34970 | DEFVAR_LISP ("set-message-function", Vset_message_function, |
| 34971 | doc: /* If non-nil, function to show the message. | 34971 | doc: /* If non-nil, function to handle display of echo-area messages. |
| 34972 | The function is called with one argument that is the message. | 34972 | The function is called with one argument that is the text of a message. |
| 34973 | When this function returns nil, the message is displayed in the echo | 34973 | If this function returns nil, the message is displayed in the echo area |
| 34974 | area as usual. When the function returns a string, the returned | 34974 | as usual. If the function returns a string, the returned string is |
| 34975 | string is displayed in the echo area. When this function returns | 34975 | displayed in the echo area. If this function returns any other non-nil |
| 34976 | other non-nil values, this means that the message was handled | 34976 | value, this means that the message was already handled, and the original |
| 34977 | specially, so the same message is not displayed in the echo area. | 34977 | message text will not be displayed in the echo area. |
| 34978 | See also `clear-message-function' that can be used to clear the | 34978 | See also `clear-message-function' that can be used to clear the |
| 34979 | message displayed by this function. */); | 34979 | message displayed by this function. */); |
| 34980 | Vset_message_function = Qnil; | 34980 | Vset_message_function = Qnil; |
| 34981 | 34981 | ||
| 34982 | DEFVAR_LISP ("clear-message-function", Vclear_message_function, | 34982 | DEFVAR_LISP ("clear-message-function", Vclear_message_function, |
| 34983 | doc: /* If non-nil, function to clear message. | 34983 | doc: /* If non-nil, function to clear echo-area messages. |
| 34984 | Usually this function is called when the next input event arrives. | 34984 | Usually this function is called when the next input event arrives. |
| 34985 | The function is called without arguments. It is expected to clear the | 34985 | The function is called without arguments. It is expected to clear the |
| 34986 | message displayed by its counterpart function specified by | 34986 | message displayed by its counterpart function specified by |