From: Michael Albinus Date: Sun, 27 Jan 2013 10:43:33 +0000 (+0100) Subject: * autorevert.el (auto-revert-handler): Notifications which result X-Git-Tag: emacs-24.3.90~173^2~7^2~213 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=629cb6ec0015827ba2248ce4eb700bb12431fa37;p=emacs.git * autorevert.el (auto-revert-handler): Notifications which result from a saved file shall not be taken into account. (Bug#13557) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7c510771264..610a237b050 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-01-27 Michael Albinus + + * autorevert.el (auto-revert-handler): Notifications which result + from a saved file shall not be taken into account. (Bug#13557) + 2013-01-26 Andreas Schwab * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add optional diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 25a953e1719..9270b98ac83 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -612,21 +612,16 @@ This is an internal function used by Auto-Revert Mode." (or (and buffer-file-name (or auto-revert-remote-files (not (file-remote-p buffer-file-name))) + (or (not auto-revert-use-notify) + auto-revert-notify-modified-p) (if auto-revert-tail-mode - (and (or (not auto-revert-use-notify) - auto-revert-notify-modified-p) - (file-readable-p buffer-file-name) + (and (file-readable-p buffer-file-name) (/= auto-revert-tail-pos (setq size (nth 7 (file-attributes buffer-file-name))))) - ;; When `auto-revert-use-notify' is set, we do - ;; not apply further checks for performance - ;; reasons. - (if auto-revert-use-notify - auto-revert-notify-modified-p - (and (file-readable-p buffer-file-name) - (not (verify-visited-file-modtime buffer)))))) + (and (file-readable-p buffer-file-name) + (not (verify-visited-file-modtime buffer))))) (and (or auto-revert-mode global-auto-revert-non-file-buffers) revert-buffer-function @@ -634,8 +629,8 @@ This is an internal function used by Auto-Revert Mode." (functionp buffer-stale-function) (funcall buffer-stale-function t)))) eob eoblist) + (setq auto-revert-notify-modified-p nil) (when revert - (setq auto-revert-notify-modified-p nil) (when (and auto-revert-verbose (not (eq revert 'fast))) (message "Reverting buffer `%s'." (buffer-name)))