summaryrefslogtreecommitdiff
path: root/lisp/autorevert.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2013-12-09 15:47:00 +0100
committerMichael Albinus <michael.albinus@gmx.de>2013-12-09 15:47:00 +0100
commita1099a91df2596511073422c90e8fdf84f5c5b63 (patch)
tree36dbab33efc6e9f40954669cfed26fd4fdd62082 /lisp/autorevert.el
parent5e48429a26cf87bdbabc242bc8fce447e3910adf (diff)
downloademacs-a1099a91df2596511073422c90e8fdf84f5c5b63.tar.gz
* autorevert.el (auto-revert-notify-add-watch): Do not handle symlinked files.
Diffstat (limited to 'lisp/autorevert.el')
-rw-r--r--lisp/autorevert.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 65526f07e1b..f0929f95e38 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -504,13 +504,15 @@ will use an up-to-date value of `auto-revert-interval'"
(defun auto-revert-notify-add-watch ()
"Enable file notification for current buffer's associated file."
- (when (string-match auto-revert-notify-exclude-dir-regexp
- (expand-file-name default-directory))
+ ;; We can assume that `buffer-file-name' and
+ ;; `auto-revert-use-notify' are non-nil.
+ (when (or (string-match auto-revert-notify-exclude-dir-regexp
+ (expand-file-name default-directory))
+ (not (file-symlink-p buffer-file-name)))
;; Fallback to file checks.
(set (make-local-variable 'auto-revert-use-notify) nil))
- (when (and buffer-file-name auto-revert-use-notify
- (not auto-revert-notify-watch-descriptor))
+ (when (not auto-revert-notify-watch-descriptor)
(setq auto-revert-notify-watch-descriptor
(ignore-errors
(file-notify-add-watch