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

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

[elpa] externals/denote d2f14291bf 06/27: Move let bound filter into its


From: ELPA Syncer
Subject: [elpa] externals/denote d2f14291bf 06/27: Move let bound filter into its own function
Date: Sun, 3 Jul 2022 00:57:34 -0400 (EDT)

branch: externals/denote
commit d2f14291bf0787c2294fb71b66429dfc4957293c
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Move let bound filter into its own function
    
    Makes it easier to read.
---
 denote.el | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/denote.el b/denote.el
index 9c4abb2f55..58ea9ed912 100644
--- a/denote.el
+++ b/denote.el
@@ -329,17 +329,21 @@ FILE must be an absolute path."
 
 ;;;; Keywords
 
+(defun denote--directory-files-recursively (directory)
+  "Return expanded files in DIRECTORY recursively."
+  (mapcar
+   (lambda (s) (expand-file-name s))
+   (seq-remove
+    (lambda (f)
+      (not (denote--only-note-p f)))
+    (directory-files-recursively directory directory-files-no-dot-files-regexp 
t))))
+
 (defun denote--directory-files (&optional absolute)
   "List note files.
 If optional ABSOLUTE, show full paths, else only show base file
 names that are relative to the variable `denote-directory'."
   (let* ((default-directory (denote-directory))
-         (files (mapcar
-                 (lambda (s) (expand-file-name s))
-                 (seq-remove
-                  (lambda (f)
-                    (not (denote--only-note-p f)))
-                  (directory-files-recursively default-directory 
directory-files-no-dot-files-regexp t)))))
+         (files (denote--directory-files-recursively default-directory)))
     (if absolute
         files
       (mapcar



reply via email to

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