diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2017-03-22 19:33:03 +0000 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2017-03-22 19:33:03 +0000 |
commit | 560d6f91246ee90ac6e630ae941097a4d4f8f730 (patch) | |
tree | 9fc886a0cc6f719a4bcd981634ffdbd58c6599c3 /lisp/filenotify.el | |
parent | 716b46848989bc343797d98488a7a0cc33ed3179 (diff) | |
download | emacs-560d6f91246ee90ac6e630ae941097a4d4f8f730.tar.gz emacs-560d6f91246ee90ac6e630ae941097a4d4f8f730.tar.bz2 emacs-560d6f91246ee90ac6e630ae941097a4d4f8f730.zip |
Fix filenotify.el issue for kqueue
* lisp/filenotify.el (file-notify-add-watch): Use directory
for remote file name handlers.
* test/lisp/filenotify-tests.el (file-notify-test01-add-watch):
Create/delete temporary file only for "kqueue".
(file-notify-test02-rm-watch): Create/delete temporary files.
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r-- | lisp/filenotify.el | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 7eb6229976a..80e9f898b2e 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -347,13 +347,7 @@ FILE is the name of the file whose event is being reported." (if handler ;; A file name handler could exist even if there is no local ;; file notification support. - (setq desc (funcall - handler 'file-notify-add-watch - ;; kqueue does not report file changes in - ;; directory monitor. So we must watch the file - ;; itself. - (if (eq file-notify--library 'kqueue) file dir) - flags callback)) + (setq desc (funcall handler 'file-notify-add-watch dir flags callback)) ;; Check, whether Emacs has been compiled with file notification ;; support. @@ -391,6 +385,8 @@ FILE is the name of the file whose event is being reported." ;; Call low-level function. (setq desc (funcall + ;; kqueue does not report file changes in directory + ;; monitor. So we must watch the file itself. func (if (eq file-notify--library 'kqueue) file dir) l-flags 'file-notify-callback))) |