diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-08-01 19:18:37 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-08-01 19:18:37 -0400 |
commit | 76dc5996b48e65d992e85e5836dcec38955407d5 (patch) | |
tree | 50be1b591e59d14b39f64fd82d2b8a81fa81e579 /lisp/autorevert.el | |
parent | 7d7e9a7314a07a690f19ad4baff93e99445db005 (diff) | |
download | emacs-76dc5996b48e65d992e85e5836dcec38955407d5.tar.gz |
* lisp/files.el: Use lexical-binding.
(dir-locals-read-from-file): Remove unused `err' variable.
(hack-dir-local-variables--warned-coding): New var.
(hack-dir-local-variables): Use it to avoid repeated warnings.
(make-backup-file-name--default-function): New function.
(make-backup-file-name-function): Use it as default.
(buffer-stale--default-function): New function.
(buffer-stale-function): Use it as default.
(revert-buffer-insert-file-contents--default-function): New function.
(revert-buffer-insert-file-contents-function): Use it as default.
(insert-directory): Avoid add-to-list.
* lisp/autorevert.el (auto-revert-handler): Simplify.
Use buffer-stale--default-function.
Diffstat (limited to 'lisp/autorevert.el')
-rw-r--r-- | lisp/autorevert.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 1617a31cd82..978a834cb4c 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -595,14 +595,14 @@ This is an internal function used by Auto-Revert Mode." (setq size (nth 7 (file-attributes buffer-file-name))))) - (and (file-readable-p buffer-file-name) - (not (verify-visited-file-modtime buffer))))) + (funcall (or buffer-stale-function + #'buffer-stale--default-function) + t))) (and (or auto-revert-mode global-auto-revert-non-file-buffers) - revert-buffer-function - (boundp 'buffer-stale-function) - (functionp buffer-stale-function) - (funcall buffer-stale-function t)))) + (funcall (or buffer-stale-function + #'buffer-stale--default-function) + t)))) eob eoblist) (setq auto-revert-notify-modified-p nil) (when revert |