X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ef3544f6a6cd1cea6a415d58e39d3a4bebd450f5..01fcc3a532872b29784a4d888ab9cc1aef0eed01:/lisp/autorevert.el diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 25a953e171..fe6cf21636 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -278,7 +278,7 @@ This variable becomes buffer local when set in any fashion.") "If non-nil Auto Revert Mode uses file notification functions. This requires Emacs being compiled with file notification support (see `auto-revert-notify-enabled'). You should set this -variable through Custom only." +variable through Custom." :group 'auto-revert :type 'boolean :set (lambda (variable value) @@ -289,6 +289,7 @@ variable through Custom only." (with-current-buffer buf (when (symbol-value 'auto-revert-notify-watch-descriptor) (auto-revert-notify-rm-watch))))))) + :initialize 'custom-initialize-default :version "24.4") (defcustom auto-revert-notify-exclude-dir-regexp @@ -612,21 +613,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 +630,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)))