From: Michael Albinus Date: Mon, 16 Nov 2015 07:20:22 +0000 (+0100) Subject: * lisp/filenotify.el (file-notify-add-watch): Fix thinko. X-Git-Tag: emacs-26.0.90~2931^2~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90d6c69;p=emacs.git * lisp/filenotify.el (file-notify-add-watch): Fix thinko. --- 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.