aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2017-03-17 10:25:46 +0100
committerMichael Albinus2017-03-17 10:25:46 +0100
commit6b2f3ba02ab1cf54e2bdbb0207843cf86de48191 (patch)
treec319b1e53f21d040708058296e386f6f4a7af7ff /lisp
parent938e7826ff849c14cb092dec8e2c1198413c7462 (diff)
downloademacs-6b2f3ba02ab1cf54e2bdbb0207843cf86de48191.tar.gz
emacs-6b2f3ba02ab1cf54e2bdbb0207843cf86de48191.zip
Fix Bug#26127
* lisp/filenotify.el (file-notify--rm-descriptor): Check, that there is a function which could be called. (Bug#26127) * test/lisp/filenotify-tests.el (file-notify--test-cleanup): Clear also `file-notify-descriptors'. (file-notify--test-make-temp-name): Move up. (file-notify-test02-rm-watch): New test. (file-notify-test03-events, file-notify-test04-autorevert) (file-notify-test05-file-validity) (file-notify-test06-dir-validity) (file-notify-test07-many-events, file-notify-test08-backup) (file-notify-test09-watched-file-in-watched-dir) (file-notify-test10-sufficient-resources): Rename.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/filenotify.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 1de5420f1e7..7eb6229976a 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -62,9 +62,10 @@ If it is registered in `file-notify-descriptors', a stopped event is sent."
62 62
63 (when (consp registered) 63 (when (consp registered)
64 ;; Send `stopped' event. 64 ;; Send `stopped' event.
65 (funcall 65 (when (consp (assoc file (cdr registered)))
66 (cdr (assoc file (cdr registered))) 66 (funcall
67 `(,descriptor stopped ,(if file (expand-file-name file dir) dir))) 67 (cdr (assoc file (cdr registered)))
68 `(,descriptor stopped ,(if file (expand-file-name file dir) dir))))
68 69
69 ;; Modify `file-notify-descriptors'. 70 ;; Modify `file-notify-descriptors'.
70 (if (not file) 71 (if (not file)