branch: externals/denote
commit b54229c7240256b5c47252f7a78c85f367c107e8
Merge: 8f7099eeb8 6c2295e75e
Author: Protesilaos Stavrou <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #599 from mjkalyan/prefix
De-duplicate code in ‘denote-format-buffer-name’
---
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