]> code.delx.au - gnu-emacs/commitdiff
* lisp/filenotify.el: Use lexical-binding
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 9 Sep 2015 20:21:59 +0000 (16:21 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 9 Sep 2015 20:21:59 +0000 (16:21 -0400)
(file-notify-add-watch): Avoid add-to-list.

lisp/filenotify.el

index 4af9e90a35ad84b40937ecc7ea23bb62839ca8ad..89fc3733eba14491fa2ac56546cccd81f0a21f75 100644 (file)
@@ -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)))