(not (eq (car attributes) t))
(equal (nth 5 attributes) modtime)))))
+(defvar auto-revert-remote-files)
+
(defun dired-buffer-stale-p (&optional noconfirm)
"Return non-nil if current Dired buffer needs updating.
-If NOCONFIRM is non-nil, then this function always returns nil
-for a remote directory. This feature is used by Auto Revert mode."
+If NOCONFIRM is non-nil, then this function returns nil for a
+remote directory, unless `auto-revert-remote-files' is non-nil.
+This feature is used by Auto Revert mode."
(let ((dirname
(if (consp dired-directory) (car dired-directory) dired-directory)))
(and (stringp dirname)
- (not (when noconfirm (file-remote-p dirname)))
+ (not (when noconfirm (and (not auto-revert-remote-files)
+ (file-remote-p dirname))))
(file-readable-p dirname)
;; Do not auto-revert when the dired buffer can be currently
;; written by the user as in `wdired-mode'.