summaryrefslogtreecommitdiff
path: root/lisp/filenotify.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r--lisp/filenotify.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 4d22061138f..a6054c175f1 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -30,6 +30,9 @@
(require 'cl-lib)
(eval-when-compile (require 'subr-x))
+(defvar file-notify-debug nil
+ "Use for debug messages.")
+
(defconst file-notify--library
(cond
((featurep 'inotify) 'inotify)
@@ -93,7 +96,8 @@ If EVENT is a filewatch event, call its callback. It has the format
Otherwise, signal a `file-notify-error'."
(interactive "e")
- ;;(message "file-notify-handle-event %S" event)
+ (when file-notify-debug
+ (message "file-notify-handle-event %S" event))
(if (and (consp event)
(eq (car event) 'file-notify)
(>= (length event) 3))
@@ -242,11 +246,12 @@ EVENT is the cadr of the event in `file-notify-handle-event'
(string-equal
(file-notify--watch-filename watch)
(file-name-nondirectory file1)))))
- ;;(message
- ;;"file-notify-callback %S %S %S %S %S %S %S"
- ;;desc action file file1 watch
- ;;(file-notify--event-watched-file event)
- ;;(file-notify--watch-directory watch))
+ (when file-notify-debug
+ (message
+ "file-notify-callback %S %S %S %S %S %S %S"
+ desc action file file1 watch
+ (file-notify--event-watched-file event)
+ (file-notify--watch-directory watch)))
(funcall (file-notify--watch-callback watch)
(if file1
`(,desc ,action ,file ,file1)