diff options
| author | Juri Linkov | 2019-11-10 00:46:29 +0200 |
|---|---|---|
| committer | Juri Linkov | 2019-11-10 00:46:29 +0200 |
| commit | 869361113613730d367b0f4966489d32ca533491 (patch) | |
| tree | 0cb687d21af8b333fa8a860222d168312d35f4aa | |
| parent | 8d68025baf912462748ce94ba79f2f54cdd22283 (diff) | |
| download | emacs-869361113613730d367b0f4966489d32ca533491.tar.gz emacs-869361113613730d367b0f4966489d32ca533491.zip | |
Don't obscure the minibuffer by message (bug#17272)
* lisp/subr.el (do-after-load-evaluation): Use minibuffer-message
to not obscure a possibly active minibuffer.
* lisp/minibuffer.el (minibuffer-message):
Record message in the *Messages* buffer.
| -rw-r--r-- | lisp/minibuffer.el | 5 | ||||
| -rw-r--r-- | lisp/subr.el | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 2b1343858f6..6e72eb73f99 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -715,6 +715,11 @@ If ARGS are provided, then pass MESSAGE through `format-message'." | |||
| 715 | (message "%s" message)) | 715 | (message "%s" message)) |
| 716 | (prog1 (sit-for (or minibuffer-message-timeout 1000000)) | 716 | (prog1 (sit-for (or minibuffer-message-timeout 1000000)) |
| 717 | (message nil))) | 717 | (message nil))) |
| 718 | ;; Record message in the *Messages* buffer | ||
| 719 | (let ((inhibit-message t)) | ||
| 720 | (if args | ||
| 721 | (apply #'message message args) | ||
| 722 | (message "%s" message))) | ||
| 718 | ;; Clear out any old echo-area message to make way for our new thing. | 723 | ;; Clear out any old echo-area message to make way for our new thing. |
| 719 | (message nil) | 724 | (message nil) |
| 720 | (setq message (if (and (null args) | 725 | (setq message (if (and (null args) |
diff --git a/lisp/subr.el b/lisp/subr.el index 8ac2f868c01..ea56b490871 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -4552,8 +4552,8 @@ This function is called directly from the C code." | |||
| 4552 | (byte-compile-warn "%s" msg)) | 4552 | (byte-compile-warn "%s" msg)) |
| 4553 | (run-with-timer 0 nil | 4553 | (run-with-timer 0 nil |
| 4554 | (lambda (msg) | 4554 | (lambda (msg) |
| 4555 | (message "%s" msg)) | 4555 | (minibuffer-message "%s" msg)) |
| 4556 | msg))))) | 4556 | msg))))) |
| 4557 | 4557 | ||
| 4558 | ;; Finally, run any other hook. | 4558 | ;; Finally, run any other hook. |
| 4559 | (run-hook-with-args 'after-load-functions abs-file)) | 4559 | (run-hook-with-args 'after-load-functions abs-file)) |