summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2014-12-14 11:03:50 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2014-12-14 11:08:38 +0100
commite002743ed5929396df222a5de535329627667657 (patch)
treecbc57ecbb95e311a03f402ed9d551734e29fa046
parentd6e989f2e18debccceee74b310a6346cf16caa3b (diff)
Keep improving helm-walk-directory.
* helm-utils.el (helm-walk-directory): Even faster not computing the dotted files at start of loop but one by one.
-rw-r--r--helm-utils.el10
1 files changed, 3 insertions, 7 deletions
diff --git a/helm-utils.el b/helm-utils.el
index f2dea099..dd04e90b 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -457,15 +457,12 @@ instead of `helm-walk-ignore-directories'."
(if (listp skip-subdirs)
skip-subdirs
helm-walk-ignore-directories)))
- (cl-loop with ls = (sort (cl-delete-if
- (lambda (x)
- (member x '("./" "../")))
- (file-name-all-completions
- "" dir))
+ (cl-loop with ls = (sort (file-name-all-completions "" dir)
'string-lessp)
for f in ls
for file = (directory-file-name
(expand-file-name f dir))
+ unless (member f '("./" "../"))
if (string-match "/\\'" f)
do (progn (when directories
(push (funcall fn file) result))
@@ -476,8 +473,7 @@ instead of `helm-walk-ignore-directories'."
(and (if (functionp match)
(funcall match f)
(and (stringp match)
- (string-match
- match f)))
+ (string-match match f)))
(push (funcall fn file) result))
(push (funcall fn file) result))))))
(funcall ls-R directory)