emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master fce520f 08/39: Improve which-key--format-and-replace


From: Justin Burkett
Subject: [elpa] master fce520f 08/39: Improve which-key--format-and-replace
Date: Thu, 21 Jun 2018 15:48:13 -0400 (EDT)

branch: master
commit fce520f8af727bd33861f8d0f7655c01ea84ad85
Author: Justin Burkett <address@hidden>
Commit: Justin Burkett <address@hidden>

    Improve which-key--format-and-replace
    
    Do a better job with nil descriptions
---
 which-key.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/which-key.el b/which-key.el
index 827261d..89c0468 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1632,9 +1632,11 @@ alists. Returns a list (key separator description)."
              (hl-face (which-key--highlight-face orig-desc))
              (key-binding (which-key--maybe-replace (cons keys orig-desc)))
              (final-desc (which-key--propertize-description
-                          (cdr key-binding) group local hl-face orig-desc))
-             (final-desc (which-key--maybe-add-docstring final-desc orig-desc))
-             (final-desc (which-key--truncate-description final-desc)))
+                          (cdr key-binding) group local hl-face orig-desc)))
+        (when final-desc
+          (setq final-desc
+                (which-key--truncate-description
+                 (which-key--maybe-add-docstring final-desc orig-desc))))
         (when (consp key-binding)
           (push
            (list (which-key--propertize-key



reply via email to

[Prev in Thread] Current Thread [Next in Thread]