summaryrefslogtreecommitdiff
path: root/lisp/autorevert.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2013-04-05 12:18:43 +0200
committerMichael Albinus <michael.albinus@gmx.de>2013-04-05 12:18:43 +0200
commit2a417372c4a06fe90c343bc59660268c7a5ac3e9 (patch)
treecd7a1b819fb1d371d810d1124d70048467d50f3c /lisp/autorevert.el
parentfc164b0c33ea4d65e5d1da2c3925569b032b398d (diff)
downloademacs-2a417372c4a06fe90c343bc59660268c7a5ac3e9.tar.gz
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode): Let-bind `auto-revert-use-notify' to nil during initialization, in order not to miss changes since the file was opened. (Bug#14140)
Diffstat (limited to 'lisp/autorevert.el')
-rw-r--r--lisp/autorevert.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index a2d70c37762..02a99ce98e7 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -367,8 +367,9 @@ without being changed in the part that is already in the buffer."
(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
@@ -422,7 +423,8 @@ Use `auto-revert-mode' for changes other than appends!"
(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
@@ -467,7 +469,8 @@ specifies in the mode line."
: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