summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-09-09 16:21:59 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2015-09-09 16:21:59 -0400
commit75a351bc6fee0dcba72bce96706ba0c18b2df111 (patch)
treeb10afc2b4d794bf496d3683a66615ae148f365c0 /lisp
parent1c5b7ba8761af7aa2f476d98abcd653cdb966301 (diff)
downloademacs-75a351bc6fee0dcba72bce96706ba0c18b2df111.tar.gz
* lisp/filenotify.el: Use lexical-binding
(file-notify-add-watch): Avoid add-to-list.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/filenotify.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 4af9e90a35a..89fc3733eba 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -1,4 +1,4 @@
-;;; filenotify.el --- watch files for changes on disk
+;;; filenotify.el --- watch files for changes on disk -*- lexical-binding:t -*-
;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
@@ -300,11 +300,10 @@ FILE is the name of the file whose event is being reported."
((eq file-notify--library 'w32notify)
'(file-name directory-name size last-write-time)))))
(when (memq 'attribute-change flags)
- (add-to-list
- 'l-flags
- (cond
- ((eq file-notify--library 'inotify) 'attrib)
- ((eq file-notify--library 'w32notify) 'attributes)))))
+ (push (cond
+ ((eq file-notify--library 'inotify) 'attrib)
+ ((eq file-notify--library 'w32notify) 'attributes))
+ l-flags)))
;; Call low-level function.
(setq desc (funcall func dir l-flags 'file-notify-callback)))