(auto-revert-handler, auto-revert-active-p): New functions.
(auto-revert-buffers): Moved revert logic to `auto-revert-handler'
and `auto-revert-active-p'.
+ (eval-when-compile): Defvar dired-directory.
2004-02-16 Alfred M. Szmidt <ams@kemisten.nu> (tiny change)
;; Dependencies:
(require 'timer)
-(eval-when-compile (require 'cl))
+(autoload 'dired-get-filename "dired")
+
+(eval-when-compile
+ (defvar dired-directory)
+ (require 'cl))
;; Custom Group:
(defun auto-revert-dired-file-list ()
"Return list of dired files."
- (let (list)
+ (let (file list)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(and (not (buffer-modified-p))
(if (buffer-file-name)
(and (file-readable-p (buffer-file-name))
- (not (verify-visited-file-modtime buf)))
+ (not (verify-visited-file-modtime (current-buffer))))
(and revert-buffer-function
(or (and global-auto-revert-mode
global-auto-revert-non-file-buffers)