summaryrefslogtreecommitdiff
path: root/lisp/filenotify.el
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2017-03-26 11:41:12 +0200
committerMichael Albinus <michael.albinus@gmx.de>2017-03-26 11:41:12 +0200
commit082e2cb3f40b717e4c00d31532927c9693b7cb9b (patch)
tree1253ac29628da55e1c4e5f8533f67d22efb2e88d /lisp/filenotify.el
parent74129db63d690747c008b1b5d442fe41056584c3 (diff)
downloademacs-082e2cb3f40b717e4c00d31532927c9693b7cb9b.tar.gz
Minor fixes for inotify.c and filenotify.el
* lisp/filenotify.el (file-notify--watch-absolute-filename): Add docstring. (file-notify-callback): Simplify. * src/inotify.c (Finotify_add_watch): Adapt docstring.
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r--lisp/filenotify.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 55ce94a1cad..c3d7d7223a7 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -52,6 +52,7 @@ could use another implementation.")
callback)
(defun file-notify--watch-absolute-filename (watch)
+ "Return the absolute filename observed by WATCH."
(if (file-notify--watch-filename watch)
(expand-file-name
(file-notify--watch-filename watch)
@@ -204,7 +205,7 @@ EVENT is the cadr of the event in `file-notify-handle-event'
(car file-notify--pending-event)))
;; If the source is handled by another watch, we
;; must fire the rename event there as well.
- (when (not (equal desc (caar file-notify--pending-event)))
+ (unless (equal desc (caar file-notify--pending-event))
(setq pending-event
`((,(caar file-notify--pending-event)
renamed ,file ,file1)
@@ -214,9 +215,6 @@ EVENT is the cadr of the event in `file-notify-handle-event'
;; Apply pending callback.
(when pending-event
- (setcar
- (car pending-event)
- (caar pending-event))
(funcall (cadr pending-event) (car pending-event))
(setq pending-event nil))