branch: externals/denote
commit 92ffc365e93a9ff15cb1baea2dd63ceab215fe87
Author: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com>

    Refactor denote-link--map-over-notes
---
 denote.el | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/denote.el b/denote.el
index 642e9b7e31..8dba54f46b 100644
--- a/denote.el
+++ b/denote.el
@@ -3464,11 +3464,8 @@ inserts links with just the identifier."
 
 (defun denote-link--map-over-notes ()
   "Return list of `denote-file-is-note-p' from Dired marked items."
-  (seq-filter
-   (lambda (f)
-     (and (denote-file-is-note-p f)
-          (denote--dir-in-denote-directory-p default-directory)))
-   (dired-get-marked-files)))
+  (when (denote--dir-in-denote-directory-p default-directory)
+    (seq-filter #'denote-file-is-note-p (dired-get-marked-files))))
 
 ;;;###autoload
 (defun denote-link-dired-marked-notes (files buffer &optional id-only)

Reply via email to