diff options
| author | Juri Linkov | 2019-11-27 01:43:49 +0200 |
|---|---|---|
| committer | Juri Linkov | 2019-11-27 01:43:49 +0200 |
| commit | aa89c84e00d8dc85100e6fedab7631c415e6364d (patch) | |
| tree | 5e81616e1b5f2ee5ca232a10acf63fc62a6997f8 /lisp | |
| parent | b3c0fb21bd910f5d86490154451cc324ce9ad66b (diff) | |
| download | emacs-aa89c84e00d8dc85100e6fedab7631c415e6364d.tar.gz emacs-aa89c84e00d8dc85100e6fedab7631c415e6364d.zip | |
message uses minibuffer-message in the active minibuffer (bug#17272 bug#19064)
* doc/lispref/display.texi (Displaying Messages): Explain the
behavior of using minibuffer-message if the minibuffer is active.
* src/editfns.c (Fmessage_in_echo_area): New function with body
copied from Fmessage.
(Fmessage): Call minibuffer-message in the active minibuffer,
otherwise call Fmessage_in_echo_area.
(message-in-echo-area): New variable.
* lisp/isearch.el (isearch--momentary-message, isearch-message):
* lisp/minibuffer.el (minibuffer-message, minibuffer-completion-help):
Use 'message-in-echo-area' instead of 'message' where necessary.
* lisp/autorevert.el (auto-revert-handler):
* lisp/man.el (Man-bgproc-sentinel):
* lisp/subr.el (do-after-load-evaluation):
Revert recent changes that replaced 'message' with 'minibuffer-message'.
This is not needed anymore since 'message' uses 'minibuffer-message'
in the active minibuffer.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/autorevert.el | 3 | ||||
| -rw-r--r-- | lisp/isearch.el | 4 | ||||
| -rw-r--r-- | lisp/man.el | 2 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 12 | ||||
| -rw-r--r-- | lisp/subr.el | 2 |
5 files changed, 11 insertions, 12 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 079750a3f6a..9275513c8d2 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -815,8 +815,7 @@ This is an internal function used by Auto-Revert Mode." | |||
| 815 | (when revert | 815 | (when revert |
| 816 | (when (and auto-revert-verbose | 816 | (when (and auto-revert-verbose |
| 817 | (not (eq revert 'fast))) | 817 | (not (eq revert 'fast))) |
| 818 | (with-current-buffer (window-buffer (old-selected-window)) | 818 | (message "Reverting buffer `%s'." (buffer-name))) |
| 819 | (minibuffer-message "Reverting buffer `%s'." (buffer-name)))) | ||
| 820 | ;; If point (or a window point) is at the end of the buffer, we | 819 | ;; If point (or a window point) is at the end of the buffer, we |
| 821 | ;; want to keep it at the end after reverting. This allows one | 820 | ;; want to keep it at the end after reverting. This allows one |
| 822 | ;; to tail a file. | 821 | ;; to tail a file. |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 4f3342782d3..7c22e6ad971 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -2011,7 +2011,7 @@ Turning on character-folding turns off regexp mode.") | |||
| 2011 | (defun isearch--momentary-message (string) | 2011 | (defun isearch--momentary-message (string) |
| 2012 | "Print STRING at the end of the isearch prompt for 1 second." | 2012 | "Print STRING at the end of the isearch prompt for 1 second." |
| 2013 | (let ((message-log-max nil)) | 2013 | (let ((message-log-max nil)) |
| 2014 | (message "%s%s%s" | 2014 | (message-in-echo-area "%s%s%s" |
| 2015 | (isearch-message-prefix nil isearch-nonincremental) | 2015 | (isearch-message-prefix nil isearch-nonincremental) |
| 2016 | isearch-message | 2016 | isearch-message |
| 2017 | (apply #'propertize (format " [%s]" string) | 2017 | (apply #'propertize (format " [%s]" string) |
| @@ -3168,7 +3168,7 @@ If there is no completion possible, say so and continue searching." | |||
| 3168 | (isearch-message-prefix ellipsis isearch-nonincremental) | 3168 | (isearch-message-prefix ellipsis isearch-nonincremental) |
| 3169 | m | 3169 | m |
| 3170 | (isearch-message-suffix c-q-hack))) | 3170 | (isearch-message-suffix c-q-hack))) |
| 3171 | (if c-q-hack m (let ((message-log-max nil)) (message "%s" m))))) | 3171 | (if c-q-hack m (let ((message-log-max nil)) (message-in-echo-area "%s" m))))) |
| 3172 | 3172 | ||
| 3173 | (defun isearch--describe-regexp-mode (regexp-function &optional space-before) | 3173 | (defun isearch--describe-regexp-mode (regexp-function &optional space-before) |
| 3174 | "Make a string for describing REGEXP-FUNCTION. | 3174 | "Make a string for describing REGEXP-FUNCTION. |
diff --git a/lisp/man.el b/lisp/man.el index ce01fdc8056..beec2e616f5 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -1474,7 +1474,7 @@ manpage command." | |||
| 1474 | (kill-buffer Man-buffer))) | 1474 | (kill-buffer Man-buffer))) |
| 1475 | 1475 | ||
| 1476 | (when message | 1476 | (when message |
| 1477 | (minibuffer-message "%s" message))))) | 1477 | (message "%s" message))))) |
| 1478 | 1478 | ||
| 1479 | (defun Man-page-from-arguments (args) | 1479 | (defun Man-page-from-arguments (args) |
| 1480 | ;; Skip arguments and only print the page name. | 1480 | ;; Skip arguments and only print the page name. |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index b9e5d5a3a27..a7bdde478fd 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -712,16 +712,16 @@ If ARGS are provided, then pass MESSAGE through `format-message'." | |||
| 712 | (progn | 712 | (progn |
| 713 | (if args | 713 | (if args |
| 714 | (apply #'message message args) | 714 | (apply #'message message args) |
| 715 | (message "%s" message)) | 715 | (message-in-echo-area "%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-in-echo-area nil))) |
| 718 | ;; Record message in the *Messages* buffer | 718 | ;; Record message in the *Messages* buffer |
| 719 | (let ((inhibit-message t)) | 719 | (let ((inhibit-message t)) |
| 720 | (if args | 720 | (if args |
| 721 | (apply #'message message args) | 721 | (apply #'message message args) |
| 722 | (message "%s" message))) | 722 | (message-in-echo-area "%s" message))) |
| 723 | ;; 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. |
| 724 | (message nil) | 724 | (message-in-echo-area nil) |
| 725 | (setq message (if (and (null args) | 725 | (setq message (if (and (null args) |
| 726 | (string-match-p "\\` *\\[.+\\]\\'" message)) | 726 | (string-match-p "\\` *\\[.+\\]\\'" message)) |
| 727 | ;; Make sure we can put-text-property. | 727 | ;; Make sure we can put-text-property. |
| @@ -1840,7 +1840,7 @@ variables.") | |||
| 1840 | (defun minibuffer-completion-help (&optional start end) | 1840 | (defun minibuffer-completion-help (&optional start end) |
| 1841 | "Display a list of possible completions of the current minibuffer contents." | 1841 | "Display a list of possible completions of the current minibuffer contents." |
| 1842 | (interactive) | 1842 | (interactive) |
| 1843 | (message "Making completion list...") | 1843 | (message-in-echo-area "Making completion list...") |
| 1844 | (let* ((start (or start (minibuffer-prompt-end))) | 1844 | (let* ((start (or start (minibuffer-prompt-end))) |
| 1845 | (end (or end (point-max))) | 1845 | (end (or end (point-max))) |
| 1846 | (string (buffer-substring start end)) | 1846 | (string (buffer-substring start end)) |
| @@ -1851,7 +1851,7 @@ variables.") | |||
| 1851 | minibuffer-completion-predicate | 1851 | minibuffer-completion-predicate |
| 1852 | (- (point) start) | 1852 | (- (point) start) |
| 1853 | md))) | 1853 | md))) |
| 1854 | (message nil) | 1854 | (message-in-echo-area nil) |
| 1855 | (if (or (null completions) | 1855 | (if (or (null completions) |
| 1856 | (and (not (consp (cdr completions))) | 1856 | (and (not (consp (cdr completions))) |
| 1857 | (equal (car completions) string))) | 1857 | (equal (car completions) string))) |
diff --git a/lisp/subr.el b/lisp/subr.el index 01f4f531b14..7e8c4fc23cb 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -4607,7 +4607,7 @@ This function is called directly from the C code." | |||
| 4607 | (string-match "\\.elc?\\>" file)) | 4607 | (string-match "\\.elc?\\>" file)) |
| 4608 | obarray)) | 4608 | obarray)) |
| 4609 | (msg (format "Package %s is deprecated" package)) | 4609 | (msg (format "Package %s is deprecated" package)) |
| 4610 | (fun (lambda (msg) (minibuffer-message "%s" msg)))) | 4610 | (fun (lambda (msg) (message "%s" msg)))) |
| 4611 | ;; Cribbed from cl--compiling-file. | 4611 | ;; Cribbed from cl--compiling-file. |
| 4612 | (when (or (not (fboundp 'byte-compile-warning-enabled-p)) | 4612 | (when (or (not (fboundp 'byte-compile-warning-enabled-p)) |
| 4613 | (byte-compile-warning-enabled-p 'obsolete package)) | 4613 | (byte-compile-warning-enabled-p 'obsolete package)) |