aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov2019-11-10 23:21:46 +0200
committerJuri Linkov2019-11-10 23:21:46 +0200
commit7e151f5bcfe431c31528743705e6ab56cf8dc220 (patch)
treea7a44848063b2e0483f57d5eb7d756edc77af137 /lisp
parent0154e41b184a0b9938fafd9eca15399b4d5e477f (diff)
downloademacs-7e151f5bcfe431c31528743705e6ab56cf8dc220.tar.gz
emacs-7e151f5bcfe431c31528743705e6ab56cf8dc220.zip
* lisp/autorevert.el: Use 'minibuffer-message' to not obscure the prompt.
* lisp/autorevert.el (auto-revert-handler): Use 'minibuffer-message' instead of 'message'. Call it from the original window's buffer that in case of the minibuffer should be current, so minibuffer-message could add a message to it. (Bug#34614) * lisp/emacs-lisp/ert-x.el (ert--make-message-advice): Add nil to the list of values to not use for format-message, because minibuffer-message calls 'message' with nil argument, and tests fail.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/autorevert.el3
-rw-r--r--lisp/emacs-lisp/ert-x.el2
2 files changed, 3 insertions, 2 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 9275513c8d2..079750a3f6a 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -815,7 +815,8 @@ 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 (message "Reverting buffer `%s'." (buffer-name))) 818 (with-current-buffer (window-buffer (old-selected-window))
819 (minibuffer-message "Reverting buffer `%s'." (buffer-name))))
819 ;; If point (or a window point) is at the end of the buffer, we 820 ;; If point (or a window point) is at the end of the buffer, we
820 ;; want to keep it at the end after reverting. This allows one 821 ;; want to keep it at the end after reverting. This allows one
821 ;; to tail a file. 822 ;; to tail a file.
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index ee561d5b953..d09d3ae11e3 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -321,7 +321,7 @@ code under test from the behavior of the *Messages* buffer."
321COLLECTOR will be called with the message before it is passed 321COLLECTOR will be called with the message before it is passed
322to the real `message'." 322to the real `message'."
323 (lambda (func &rest args) 323 (lambda (func &rest args)
324 (if (or (null args) (equal (car args) "")) 324 (if (or (null args) (member (car args) '("" nil)))
325 (apply func args) 325 (apply func args)
326 (let ((msg (apply #'format-message args))) 326 (let ((msg (apply #'format-message args)))
327 (funcall collector (concat msg "\n")) 327 (funcall collector (concat msg "\n"))