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

    Return non-nil in denote--dir-in-denote-directory-p
---
 denote.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/denote.el b/denote.el
index 50012300fb..95757a7943 100644
--- a/denote.el
+++ b/denote.el
@@ -1535,11 +1535,10 @@ creation."
       (insert template))))
 
 (defun denote--dir-in-denote-directory-p (directory)
-  "Return DIRECTORY if in variable `denote-directory', else nil."
-  (when (and directory
-             (string-prefix-p (denote-directory)
-                              (expand-file-name directory)))
-    directory))
+  "Return non-nil if DIRECTORY is in variable `denote-directory'."
+  (and directory
+       (string-prefix-p (denote-directory)
+                        (expand-file-name directory))))
 
 (defun denote--valid-file-type (filetype)
   "Return a valid filetype given the argument FILETYPE.

Reply via email to