]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor directory-files-recursively touch-up
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 16 Jan 2015 00:12:40 +0000 (01:12 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 16 Jan 2015 00:12:52 +0000 (01:12 +0100)
* files.el (directory-files-recursively): Don't use the word
"path" for a file name.

lisp/ChangeLog
lisp/files.el

index 150f32f351a54c8afb6f23910c59b1ca38051cbf..7ef0e6a2749ce1e16ade75c37c595fa79ac026eb 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * files.el (directory-files-recursively): Don't use the word
+       "path" for a file name.
+
 2015-01-15  Wolfgang Jenkner  <wjenkner@inode.at>
 
        * calc/calc-units.el (math-units-in-expr-p)
index 175f85b29d0a0cf54a4888925d4ab9b87f8a2b79..f8318d8a34de5236b2c3c95bdc362047f4dcab30 100644 (file)
@@ -749,14 +749,15 @@ If INCLUDE-DIRECTORIES, also include directories that have matching names."
       (unless (member file '("./" "../"))
        (if (directory-name-p file)
            (let* ((leaf (substring file 0 (1- (length file))))
-                  (path (expand-file-name leaf dir)))
+                  (full-file (expand-file-name leaf dir)))
              ;; Don't follow symlinks to other directories.
-             (unless (file-symlink-p path)
-               (setq result (nconc result (directory-files-recursively
-                                           path match include-directories))))
+             (unless (file-symlink-p full-file)
+               (setq result
+                     (nconc result (directory-files-recursively
+                                    full-file match include-directories))))
              (when (and include-directories
                         (string-match match leaf))
-               (setq result (nconc result (list path)))))
+               (setq result (nconc result (list full-file)))))
          (when (string-match match file)
            (push (expand-file-name file dir) files)))))
     (nconc result (nreverse files))))