branch: externals/denote
commit 6c2295e75e73cdc462984d4b0a55da71bf6a471e
Author: James Kalyan <mjkal...@proton.me>
Commit: James Kalyan <mjkal...@proton.me>

    De-duplicate code in ‘denote-format-buffer-name’
    
    i.e. Just make the format string conditional, not the whole format.
---
 denote.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/denote.el b/denote.el
index 5f10a985b1..8497dce0fa 100644
--- a/denote.el
+++ b/denote.el
@@ -1415,9 +1415,7 @@ Return the absolute path to the matching file."
   "Use STRING to return a Denote buffer name with `denote-buffer-name-prefix'.
 With optional SPECIAL, wrap the name in asterisks, signifying that this
 is a special buffer."
-  (if special
-      (format "*%s%s*" denote-buffer-name-prefix string)
-    (format "%s%s" denote-buffer-name-prefix string)))
+  (format (if special "*%s%s*" "%s%s") denote-buffer-name-prefix string))
 
 ;;;; The sort mechanism
 

Reply via email to