emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 272b515 3/5: Fixed issue #35: 'x' key in ztree-dir was bro


From: Alexey Veretennikov
Subject: [elpa] master 272b515 3/5: Fixed issue #35: 'x' key in ztree-dir was broken
Date: Sat, 24 Sep 2016 17:52:13 +0000 (UTC)

branch: master
commit 272b5159d47a241fd9499ac6986ec3daef407ad3
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>

    Fixed issue #35: 'x' key in ztree-dir was broken
---
 ztree-dir.el |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ztree-dir.el b/ztree-dir.el
index d3d3b25..a340c5e 100644
--- a/ztree-dir.el
+++ b/ztree-dir.el
@@ -145,6 +145,13 @@ Otherwise, the ztree window is used to find the file."
   (ztree-refresh-buffer))
 
 
+(defun ztree-dir-directory-files (path)
+  "Returns the list of files/directories for the given PATH"
+  ;; remove . and .. from the list of files to avoid infinite
+  ;; recursion
+  (remove-if (lambda (x) (string-match-p "/\\.\\.?$" x))
+             (directory-files path 'full)))
+
 
 
 ;;;###autoload
@@ -160,7 +167,7 @@ Otherwise, the ztree window is used to find the file."
                   #'ztree-file-short-name
                   #'file-directory-p
                   #'string-equal
-                  (lambda (x) (directory-files x 'full))
+                  #'ztree-dir-directory-files
                   nil                   ; face
                   #'ztree-find-file)    ; action
       (ztreedir-mode))))



reply via email to

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