aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2015-11-14 11:51:28 +0000
committerMichael Albinus2015-11-25 15:07:11 +0100
commit41d9bd0c3b19d839b72fdd20e613cb6ab3b1b1f4 (patch)
treef511cf454627c1bc1c8175ac12f88f8ac76eb2cf /lisp
parentc571fc149a786a5bef7f2b283b912999d76dd313 (diff)
downloademacs-41d9bd0c3b19d839b72fdd20e613cb6ab3b1b1f4.tar.gz
emacs-41d9bd0c3b19d839b72fdd20e613cb6ab3b1b1f4.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