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

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

[elpa] externals/denote 34daa52ea3 4/7: Refactor denote--dir-in-denote-d


From: ELPA Syncer
Subject: [elpa] externals/denote 34daa52ea3 4/7: Refactor denote--dir-in-denote-directory-p
Date: Wed, 10 Aug 2022 00:57:41 -0400 (EDT)

branch: externals/denote
commit 34daa52ea3f434bfaeb477a5e65f4b279b7c9b71
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>

    Refactor denote--dir-in-denote-directory-p
    
    - (denote-directory) is already expanded
---
 denote.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/denote.el b/denote.el
index c12abb41f2..4b798fddab 100644
--- a/denote.el
+++ b/denote.el
@@ -807,10 +807,10 @@ and TEMPLATE should be valid for note creation."
 
 (defun denote--dir-in-denote-directory-p (directory)
   "Return DIRECTORY if in variable `denote-directory', else nil."
-  (when-let* ((dir directory)
-              ((string-prefix-p (expand-file-name (denote-directory))
-                                (expand-file-name dir))))
-    dir))
+  (when (and directory
+             (string-prefix-p (denote-directory)
+                              (expand-file-name directory)))
+    directory))
 
 (defun denote--file-type-symbol (filetype)
   "Return FILETYPE as a symbol."



reply via email to

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