(delq (current-buffer) auto-revert-buffer-list)))
(auto-revert-set-timer)
(when auto-revert-mode
- (auto-revert-buffers)
- (setq auto-revert-tail-mode nil)))
+ (let (auto-revert-use-notify)
+ (auto-revert-buffers)
+ (setq auto-revert-tail-mode nil))))
;;;###autoload
(y-or-n-p "File changed on disk, content may be missing. \
Perform a full revert? ")
;; Use this (not just revert-buffer) for point-preservation.
- (auto-revert-handler))
+ (let (auto-revert-use-notify)
+ (auto-revert-handler)))
;; else we might reappend our own end when we save
(add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t)
(or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position
:global t :group 'auto-revert :lighter global-auto-revert-mode-text
(auto-revert-set-timer)
(if global-auto-revert-mode
- (auto-revert-buffers)
+ (let (auto-revert-use-notify)
+ (auto-revert-buffers))
(dolist (buf (buffer-list))
(with-current-buffer buf
(when auto-revert-use-notify
(not auto-revert-notify-watch-descriptor))
(let ((func (if (fboundp 'inotify-add-watch)
'inotify-add-watch 'w32notify-add-watch))
+ ;; `attrib' is needed for file modification time.
(aspect (if (fboundp 'inotify-add-watch)
- '(create modify moved-to) '(size last-write-time)))
+ '(attrib create modify moved-to) '(size last-write-time)))
(file (if (fboundp 'inotify-add-watch)
(directory-file-name (expand-file-name default-directory))
(buffer-file-name))))
;; TODO: Filter events which stop watching, like `move' or `removed'.
(cl-assert descriptor)
(when (featurep 'inotify)
- (cl-assert (or (memq 'create action)
+ (cl-assert (or (memq 'attrib action)
+ (memq 'create action)
(memq 'modify action)
(memq 'moved-to action))))
(when (featurep 'w32notify) (cl-assert (eq 'modified action)))