emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 75a351b: * lisp/filenotify.el: Use lexical-binding


From: Stefan Monnier
Subject: [Emacs-diffs] master 75a351b: * lisp/filenotify.el: Use lexical-binding
Date: Wed, 09 Sep 2015 20:22:04 +0000

branch: master
commit 75a351bc6fee0dcba72bce96706ba0c18b2df111
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/filenotify.el: Use lexical-binding
    
    (file-notify-add-watch): Avoid add-to-list.
---
 lisp/filenotify.el |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 4af9e90..89fc373 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]