]> git.eshelyaron.com Git - emacs.git/commitdiff
* autorevert.el (auto-revert-notify-add-watch): Do not handle symlinked files.
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 9 Dec 2013 14:47:00 +0000 (15:47 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 9 Dec 2013 14:47:00 +0000 (15:47 +0100)
lisp/ChangeLog
lisp/autorevert.el

index ae0dcc3de32eef275840f44f67398a7400b1c7d0..8a05b461121e9d9ef3450ae545f1838d8f164ce8 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-09  Michael Albinus  <michael.albinus@gmx.de>
+
+       * autorevert.el (auto-revert-notify-add-watch): Do not handle
+       symlinked files.
+
 2013-12-09  Dmitry Gutov  <dgutov@yandex.ru>
 
        * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t
index 65526f07e1b31caf5a2bef5e4a1d0f2024a4f941..f0929f95e380708677b2dc27ba9ed384068cc99a 100644 (file)
@@ -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