summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/filenotify.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index a07f99adcbf..b9f59dedfde 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -333,7 +333,9 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'."
(when (stringp dir)
;; Call low-level function.
- (when (null (cdr registered))
+ (when (or (not file)
+ (and (= (length (cdr registered)) 1)
+ (assoc file (cdr registered))))
(condition-case nil
(if handler
;; A file name handler could exist even if there is no local