summaryrefslogtreecommitdiff
path: root/lisp/filenotify.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2015-09-14 22:15:20 +0200
committerMichael Albinus <michael.albinus@gmx.de>2015-09-14 22:15:20 +0200
commit67ddc7c55d6b40e3d37b2773e002a50123ae7411 (patch)
tree98e4f30f14cc1d0588a7f4b7fbee4e38055f9fca /lisp/filenotify.el
parent1ee47d477ddb9c567eaf63154f78fad5d5826b78 (diff)
downloademacs-67ddc7c55d6b40e3d37b2773e002a50123ae7411.tar.gz
Adaot file-notify-tests.el test cases
* lisp/filenotify.el (file-notify-rm-watch): Ignore `file-notify-error'. * src/inotify.c (Finotify_valid_p): Adapt docstring. * test/automated/file-notify-tests.el () (file-notify-test03-autorevert) (file-notify-test04-file-validity) (file-notify-test04-file-validity-remote) (file-notify-test05-dir-validity) (file-notify-test05-dir-validity-remote): Adapt docstring. (file-notify-test04-file-validity): Let events arrive before calling final `file-notify-valid-p'. Do not ignore errors. (file-notify-test05-dir-validity): Do not manipulate `temporary-file-directory', it isn't necessary. Let events arrive before calling final `file-notify-valid-p'. Do not ignore errors.
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r--lisp/filenotify.el24
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 002c5a5d584..1ec4e13a38b 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -345,17 +345,19 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'."
;; Call low-level function.
(when (null (cdr registered))
- (if handler
- ;; A file name handler could exist even if there is no local
- ;; file notification support.
- (funcall handler 'file-notify-rm-watch desc)
-
- (funcall
- (cond
- ((eq file-notify--library 'gfilenotify) 'gfile-rm-watch)
- ((eq file-notify--library 'inotify) 'inotify-rm-watch)
- ((eq file-notify--library 'w32notify) 'w32notify-rm-watch))
- desc))))))
+ (condition-case nil
+ (if handler
+ ;; A file name handler could exist even if there is no local
+ ;; file notification support.
+ (funcall handler 'file-notify-rm-watch desc)
+
+ (funcall
+ (cond
+ ((eq file-notify--library 'gfilenotify) 'gfile-rm-watch)
+ ((eq file-notify--library 'inotify) 'inotify-rm-watch)
+ ((eq file-notify--library 'w32notify) 'w32notify-rm-watch))
+ desc))
+ (file-notify-error nil))))))
;; Temporary declarations.
(defalias 'gfile-valid-p 'identity)