emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master e3b6596: Modify suppressing `vc-refresh-state' in f


From: Michael Albinus
Subject: [Emacs-diffs] master e3b6596: Modify suppressing `vc-refresh-state' in filenotify-tests.el
Date: Wed, 8 Feb 2017 13:34:07 -0500 (EST)

branch: master
commit e3b659630843de7e459bce483c278af765c644f7
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Modify suppressing `vc-refresh-state' in filenotify-tests.el
    
    * test/lisp/filenotify-tests.el (file-notify-test03-autorevert):
    Use an advice rather than an alias for suppressing `vc-refresh-state'.
---
 test/lisp/filenotify-tests.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index c024c51..dcd83a3 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -665,9 +665,6 @@ delivered."
 (setq auto-revert-notify-exclude-dir-regexp "nothing-to-be-excluded"
       auto-revert-remote-files t
       auto-revert-stop-on-user-input nil)
-;; In the remote case, `vc-refresh-state' returns undesired error
-;; messages.  Let's suppress them.
-(defalias 'vc-refresh-state 'ignore)
 
 (ert-deftest file-notify-test03-autorevert ()
   "Check autorevert via file notification."
@@ -679,6 +676,9 @@ delivered."
         buf)
     (unwind-protect
        (progn
+          ;; In the remote case, `vc-refresh-state' returns undesired
+          ;; error messages.  Let's suppress them.
+          (advice-add 'vc-refresh-state :around 'ignore)
          (setq file-notify--test-tmpfile (file-notify--test-make-temp-name))
          (write-region
           "any text" nil file-notify--test-tmpfile nil 'no-message)
@@ -748,6 +748,7 @@ delivered."
           (file-notify--test-cleanup-p))
 
       ;; Cleanup.
+      (advice-remove 'vc-refresh-state 'ignore)
       (ignore-errors (kill-buffer buf))
       (file-notify--test-cleanup))))
 



reply via email to

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