]> git.eshelyaron.com Git - emacs.git/commitdiff
(auto-revert-handler): Handle auto-revert-mode.
authorLuc Teirlinck <teirllm@auburn.edu>
Sun, 28 Mar 2004 01:39:49 +0000 (01:39 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Sun, 28 Mar 2004 01:39:49 +0000 (01:39 +0000)
Call vc-find-file-hook here instead of in auto-revert-buffers.
(auto-revert-buffers): Delete call to vc-find-file-hook.

lisp/ChangeLog
lisp/autorevert.el

index ab3ac98ea9d953264eb1ffdde1b530bc218de45d..787b3bd6d395588f6a17a00c09f8784e93cf859b 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-27  Luc Teirlinck  <teirllm@auburn.edu>
+
+       * autorevert.el (auto-revert-handler): Handle auto-revert-mode.
+       Call vc-find-file-hook here instead of in auto-revert-buffers.
+       (auto-revert-buffers): Delete call to vc-find-file-hook.
+
 2004-03-27  Francis J. Wright  <F.J.Wright@qmul.ac.uk>
 
        * woman.el (woman-change-fonts): Rename local variable
index 152b21eef84b067bd2ff0de2dea5246e90081d39..9d140efba84337f5c17409451445479f3902101f 100644 (file)
@@ -341,7 +341,7 @@ Use `auto-revert-mode' to revert a particular buffer."
        ((or (and (buffer-file-name)
                 (file-readable-p (buffer-file-name))
                 (not (verify-visited-file-modtime (current-buffer))))
-           (and global-auto-revert-non-file-buffers
+           (and (or auto-revert-mode global-auto-revert-non-file-buffers)
                 revert-buffer-function
                 (boundp 'buffer-stale-function)
                 (functionp buffer-stale-function)
@@ -351,6 +351,9 @@ Use `auto-revert-mode' to revert a particular buffer."
        (when auto-revert-verbose
          (message "Reverting buffer `%s'." (buffer-name)))
        (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)
+       ;; `preserve-modes' avoids changing the (minor) modes.  But we
+       ;; do want to reset the mode for VC, so we do it explicitly.
+       (vc-find-file-hook)
        (if (eq revert 'vc)
            (vc-mode-line buffer-file-name))))))
 
@@ -404,11 +407,7 @@ the timer when no buffers need to be checked."
                       (memq buf auto-revert-buffer-list))
                  (setq auto-revert-buffer-list
                        (delq buf auto-revert-buffer-list)))
-             (when (auto-revert-active-p)
-               (auto-revert-handler)
-               ;; `preserve-modes' avoids changing the (minor) modes.  But we
-               ;; do want to reset the mode for VC, so we do it explicitly.
-               (vc-find-file-hook)))
+             (when (auto-revert-active-p) (auto-revert-handler)))
          ;; Remove dead buffer from `auto-revert-buffer-list'.
          (setq auto-revert-buffer-list
                (delq buf auto-revert-buffer-list))))