diff options
| author | Michael Albinus | 2013-12-09 15:47:00 +0100 |
|---|---|---|
| committer | Michael Albinus | 2013-12-09 15:47:00 +0100 |
| commit | a1099a91df2596511073422c90e8fdf84f5c5b63 (patch) | |
| tree | 36dbab33efc6e9f40954669cfed26fd4fdd62082 | |
| parent | 5e48429a26cf87bdbabc242bc8fce447e3910adf (diff) | |
| download | emacs-a1099a91df2596511073422c90e8fdf84f5c5b63.tar.gz emacs-a1099a91df2596511073422c90e8fdf84f5c5b63.zip | |
* autorevert.el (auto-revert-notify-add-watch): Do not handle symlinked files.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/autorevert.el | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ae0dcc3de32..8a05b461121 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-12-09 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * autorevert.el (auto-revert-notify-add-watch): Do not handle | ||
| 4 | symlinked files. | ||
| 5 | |||
| 1 | 2013-12-09 Dmitry Gutov <dgutov@yandex.ru> | 6 | 2013-12-09 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 7 | ||
| 3 | * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t | 8 | * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t |
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'" | |||
| 504 | 504 | ||
| 505 | (defun auto-revert-notify-add-watch () | 505 | (defun auto-revert-notify-add-watch () |
| 506 | "Enable file notification for current buffer's associated file." | 506 | "Enable file notification for current buffer's associated file." |
| 507 | (when (string-match auto-revert-notify-exclude-dir-regexp | 507 | ;; We can assume that `buffer-file-name' and |
| 508 | (expand-file-name default-directory)) | 508 | ;; `auto-revert-use-notify' are non-nil. |
| 509 | (when (or (string-match auto-revert-notify-exclude-dir-regexp | ||
| 510 | (expand-file-name default-directory)) | ||
| 511 | (not (file-symlink-p buffer-file-name))) | ||
| 509 | ;; Fallback to file checks. | 512 | ;; Fallback to file checks. |
| 510 | (set (make-local-variable 'auto-revert-use-notify) nil)) | 513 | (set (make-local-variable 'auto-revert-use-notify) nil)) |
| 511 | 514 | ||
| 512 | (when (and buffer-file-name auto-revert-use-notify | 515 | (when (not auto-revert-notify-watch-descriptor) |
| 513 | (not auto-revert-notify-watch-descriptor)) | ||
| 514 | (setq auto-revert-notify-watch-descriptor | 516 | (setq auto-revert-notify-watch-descriptor |
| 515 | (ignore-errors | 517 | (ignore-errors |
| 516 | (file-notify-add-watch | 518 | (file-notify-add-watch |