mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 08:31:35 -08:00
* lisp/filenotify.el (file-notify-add-watch): Fix thinko.
This commit is contained in:
parent
e95b309ae4
commit
90d6c698da
1 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue