[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 7e151f5: * lisp/autorevert.el: Use 'minibuffer-message' to not ob

From: Juri Linkov
Subject: master 7e151f5: * lisp/autorevert.el: Use 'minibuffer-message' to not obscure the prompt.
Date: Sun, 10 Nov 2019 16:21:52 -0500 (EST)

branch: master
commit 7e151f5bcfe431c31528743705e6ab56cf8dc220
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * 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.
 lisp/autorevert.el       | 3 ++-
 lisp/emacs-lisp/ert-x.el | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 9275513..079750a 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -815,7 +815,8 @@ This is an internal function used by Auto-Revert Mode."
     (when revert
       (when (and auto-revert-verbose
                  (not (eq revert 'fast)))
-        (message "Reverting buffer `%s'." (buffer-name)))
+        (with-current-buffer (window-buffer (old-selected-window))
+          (minibuffer-message "Reverting buffer `%s'." (buffer-name))))
       ;; If point (or a window point) is at the end of the buffer, we
       ;; want to keep it at the end after reverting.  This allows one
       ;; to tail a file.
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index ee561d5..d09d3ae 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."
 COLLECTOR will be called with the message before it is passed
 to the real `message'."
   (lambda (func &rest args)
-    (if (or (null args) (equal (car args) ""))
+    (if (or (null args) (member (car args) '("" nil)))
         (apply func args)
       (let ((msg (apply #'format-message args)))
         (funcall collector (concat msg "\n"))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]