summaryrefslogtreecommitdiff
path: root/lisp/autorevert.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2013-07-18 12:03:49 +0200
committerMichael Albinus <michael.albinus@gmx.de>2013-07-18 12:03:49 +0200
commite06ec67f56e7cce9b956e2882950379e96514266 (patch)
tree988cdc15f463410f4da9ae664c929409145bf6bb /lisp/autorevert.el
parenta8cd4836451373f56b719cf3b80fb3344a3422db (diff)
downloademacs-e06ec67f56e7cce9b956e2882950379e96514266.tar.gz
* filenotify.el (file-notify--library): Renamed from
`file-notify-support'. Do not autoload. Adapt all uses. (file-notify-supported-p): New defun. * autorevert.el (auto-revert-use-notify): Use `file-notify-supported-p' instead of `file-notify-support'. Adapt docstring. (auto-revert-notify-add-watch): Use `file-notify-supported-p'. * net/tramp.el (tramp-file-name-for-operation): Add `file-notify-supported-p'. * net/tramp-sh.el (tramp-sh-handle-file-notify-supported-p): New defun. (tramp-sh-file-name-handler-alist): Add it as handler for `file-notify-supported-p '. * net/tramp-adb.el (tramp-adb-file-name-handler-alist): * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `ignore' as handler for `file-notify-*' functions.
Diffstat (limited to 'lisp/autorevert.el')
-rw-r--r--lisp/autorevert.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 00e88fc4a3d..5c593e2ef71 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -271,21 +271,20 @@ This variable becomes buffer local when set in any fashion.")
:type 'boolean
:version "24.4")
-(defcustom auto-revert-use-notify (and file-notify-support t)
+(defcustom auto-revert-use-notify
+ ;; We use the support of the local filesystem as default.
+ (file-notify-supported-p temporary-file-directory)
"If non-nil Auto Revert Mode uses file notification functions.
-This requires Emacs being compiled with file notification
-support (see `file-notify-support'). You should set this variable
-through Custom."
+You should set this variable through Custom."
:group 'auto-revert
:type 'boolean
:set (lambda (variable value)
- (set-default variable (and file-notify-support value))
+ (set-default variable value)
(unless (symbol-value variable)
- (when file-notify-support
- (dolist (buf (buffer-list))
- (with-current-buffer buf
- (when (symbol-value 'auto-revert-notify-watch-descriptor)
- (auto-revert-notify-rm-watch)))))))
+ (dolist (buf (buffer-list))
+ (with-current-buffer buf
+ (when (symbol-value 'auto-revert-notify-watch-descriptor)
+ (auto-revert-notify-rm-watch))))))
:initialize 'custom-initialize-default
:version "24.4")
@@ -513,7 +512,8 @@ will use an up-to-date value of `auto-revert-interval'"
(set (make-local-variable 'auto-revert-use-notify) nil))
(when (and buffer-file-name auto-revert-use-notify
- (not auto-revert-notify-watch-descriptor))
+ (not auto-revert-notify-watch-descriptor)
+ (file-notify-supported-p buffer-file-name))
(setq auto-revert-notify-watch-descriptor
(ignore-errors
(file-notify-add-watch