Skip to content

Commit

Permalink
; Use string-join to simplify and make meaning explicit
Browse files Browse the repository at this point in the history
* which-key.el (which-key--butlast-string):  Replace mapconcat by string-join.
  • Loading branch information
jeremy-bryant authored and justbur committed Mar 3, 2024
1 parent 0f5733b commit 85f17c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion which-key.el
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ Within these categories order using `which-key-key-order'."
(if (stringp maybe-string) (string-width maybe-string) 0))

(defsubst which-key--butlast-string (str)
(mapconcat #'identity (butlast (split-string str)) " "))
(string-join (butlast (split-string str)) " "))

(defun which-key--match-replacement (key-binding replacement)
;; these are mode specific ones to ignore. The mode specific case is
Expand Down

0 comments on commit 85f17c0

Please sign in to comment.