branch: externals/denote commit ab2a6e538afd1c7643c98c8defacb57587ee4a50 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@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