changeset 54045:d2d55f9f67e7

(auto-revert-buffer-p): Only revert dired buffers if one of global-auto-revert-non-file-buffers or autorevert-mode is non-nil.
author Luc Teirlinck <teirllm@auburn.edu>
date Tue, 17 Feb 2004 02:24:44 +0000
parents 08780c888051
children 06a097459dbe
files lisp/autorevert.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/autorevert.el	Tue Feb 17 01:15:45 2004 +0000
+++ b/lisp/autorevert.el	Tue Feb 17 02:24:44 2004 +0000
@@ -297,10 +297,13 @@
 
 (defun auto-revert-buffer-p ()
   "Check if current buffer should be reverted."
-  ;;  - Always include dired buffers to list. It would be too expensive
+  ;;  - Always include dired buffers to list.  It would be too expensive
   ;;  to test the "revert" status here each time timer launches.
   ;;  - Same for VC buffers.
-  (or (eq major-mode 'dired-mode)
+  (or (and (eq major-mode 'dired-mode)
+	   (or (and global-auto-revert-mode
+		    global-auto-revert-non-file-buffers)
+	       auto-revert-mode))
       (and (not (buffer-modified-p))
 	   (auto-revert-vc-buffer-p))
       (and (not (buffer-modified-p))