branch: externals/denote commit 16867ec4f7b36d76eb2da421058317bbc235c42e Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Simplify code of denote--sluggify-keywords This is courtesy of Stefan Monnier: <https://lists.gnu.org/archive/html/emacs-devel/2022-07/msg00131.html>. --- denote.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/denote.el b/denote.el index e0018c0dc1..9729286b91 100644 --- a/denote.el +++ b/denote.el @@ -316,9 +316,10 @@ trailing hyphen." (defun denote--sluggify-keywords (keywords) "Sluggify KEYWORDS." - (if denote-allow-multi-word-keywords - (mapcar #'denote--sluggify keywords) - (mapcar #'denote--sluggify-and-join keywords))) + (mapcar (if denote-allow-multi-word-keywords + #'denote--sluggify + #'denote--sluggify-and-join) + keywords)) (defun denote--file-empty-p (file) "Return non-nil if FILE is empty."