1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00

* lisp/filenotify.el (file-notify-add-watch): Fix thinko.

This commit is contained in:
Michael Albinus 2015-11-16 08:20:22 +01:00
parent e95b309ae4
commit 90d6c698da

View File

@ -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.