]> git.eshelyaron.com Git - emacs.git/commit
Make file-notify-rm-watch robust against reentry
authorMattias Engdegård <mattiase@acm.org>
Sat, 20 Apr 2019 08:19:52 +0000 (10:19 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 22 Apr 2019 15:54:32 +0000 (17:54 +0200)
commitc243aabfa8d280adf75024c8e6c0e68a7932f6cf
tree72bb8683c4ce909d18be2d180a174e86c1927df5
parent4e2ea400cbd78fa791fb897938a6dcb099401a25
Make file-notify-rm-watch robust against reentry

Allow file-notify callbacks to call `file-notify-rm-watch', harmlessly,
after receiving a `stopped' event without triggering recursion.

* lisp/filenotify.el (file-notify--watch): Note that `callback' can be nil.
(file-notify--rm-descriptor): Set the `callback' field to nil before
sending `stopped'.
(file-notify-rm-watch): Don't do anything if the `callback' field is nil.
lisp/filenotify.el