aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2015-11-14 11:51:28 +0000
committerMichael Albinus2015-11-14 11:51:28 +0000
commit978f5b0a705c459fc708b7adacdac2b00c759422 (patch)
tree6423a004c22773d1431d9220ed39421223a6ad8b /lisp
parent84cadc60a7cd4695b9d9e086fd8d68803388dea8 (diff)
downloademacs-978f5b0a705c459fc708b7adacdac2b00c759422.tar.gz
emacs-978f5b0a705c459fc708b7adacdac2b00c759422.zip
Implement directory events
* lisp/filenotify.el (file-notify-handle-event) (file-notify-callback): Remove traces. * src/kqueue.c: Include <sys/time.h>. (kqueue_generate_event, kqueue_compare_dir_list): New functions. (kqueue_callback): Use them. Call kevent() with a zero timeout. (Fkqueue_add_watch): Adapt docstring. Support directory events. Compute initial directory listing. Close file descriptor in case of errors. (syms_of_kqueue): Declare Qcreate.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/filenotify.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 029fcf82da8..f7c97569825 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -88,7 +88,7 @@ If EVENT is a filewatch event, call its callback. It has the format
88 88
89Otherwise, signal a `file-notify-error'." 89Otherwise, signal a `file-notify-error'."
90 (interactive "e") 90 (interactive "e")
91 (message "file-notify-handle-event %S" event) 91 ;;(message "file-notify-handle-event %S" event)
92 (if (and (eq (car event) 'file-notify) 92 (if (and (eq (car event) 'file-notify)
93 (>= (length event) 3)) 93 (>= (length event) 3))
94 (funcall (nth 2 event) (nth 1 event)) 94 (funcall (nth 2 event) (nth 1 event))
@@ -236,7 +236,7 @@ EVENT is the cadr of the event in `file-notify-handle-event'
236 (setq pending-event nil)) 236 (setq pending-event nil))
237 237
238 ;; Check for stopped. 238 ;; Check for stopped.
239 (message "file-notify-callback %S %S" file registered) 239 ;;(message "file-notify-callback %S %S" file registered)
240 (setq 240 (setq
241 stopped 241 stopped
242 (or 242 (or