From 71d88ecab786e8df1490c1dbb8cba3479c29ca12 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 16 Nov 2015 08:20:22 +0100 Subject: [PATCH] * lisp/filenotify.el (file-notify-add-watch): Fix thinko. --- lisp/filenotify.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 23029427760..eb869cf66a9 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -379,14 +379,14 @@ FILE is the name of the file whose event is being reported." ;; Modify `file-notify-descriptors'. (setq file (unless (file-directory-p file) (file-name-nondirectory file)) - desc (file-notify--descriptor desc file) + desc (if (consp desc) (car desc) desc) registered (gethash desc file-notify-descriptors) entry `(,file . ,callback)) (unless (member entry (cdr registered)) (puthash desc `(,dir ,entry . ,(cdr registered)) file-notify-descriptors)) ;; Return descriptor. - desc)) + (file-notify--descriptor desc file))) (defun file-notify-rm-watch (descriptor) "Remove an existing watch specified by its DESCRIPTOR. -- 2.39.2