From 7a30f4d4431ca155a14d1920cfae2fd04da52676 Mon Sep 17 00:00:00 2001 From: justbur Date: Mon, 30 Nov 2015 18:43:09 -0500 Subject: [PATCH] Fix return value problem for make-text-button Apparently in versions before 24.5 the return value was not always the button itself when a string was used as the argument --- which-key.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/which-key.el b/which-key.el index 758fd00f554..04bc4ef9a46 100644 --- a/which-key.el +++ b/which-key.el @@ -1237,7 +1237,8 @@ ORIGINAL-DESCRIPTION is the description given by (max (floor (* (frame-width) 0.8)))) (if (> (length str) max) (concat (substring str 0 max) "...") - str))))))))) + str))))))) + desc)) (defun which-key--format-and-replace (unformatted) "Take a list of (key . desc) cons cells in UNFORMATTED, add