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

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

[elpa] externals/denote ab2a6e538a 03/27: Use 'when' instead of 'if' for


From: ELPA Syncer
Subject: [elpa] externals/denote ab2a6e538a 03/27: Use 'when' instead of 'if' for single condition
Date: Sun, 3 Jul 2022 00:57:34 -0400 (EDT)

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

    Use 'when' instead of 'if' for single condition
---
 denote-link.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/denote-link.el b/denote-link.el
index 8970bbbc3b..9b92a24468 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -316,8 +316,8 @@ format is always [[denote:IDENTIFIER]]."
         (found-files))
     (dolist (file files)
       (dolist (i (denote-link--collect-identifiers regexp))
-        (if (string-prefix-p i (file-name-nondirectory file))
-            (push file found-files))))
+        (when (string-prefix-p i (file-name-nondirectory file))
+          (push file found-files))))
     found-files))
 
 (defvar denote-link--find-file-history nil



reply via email to

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