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

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

[elpa] externals/which-key 8361479d78 2/7: add which-key-elipsis


From: ELPA Syncer
Subject: [elpa] externals/which-key 8361479d78 2/7: add which-key-elipsis
Date: Sat, 1 Jan 2022 23:57:56 -0500 (EST)

branch: externals/which-key
commit 8361479d78a2c5dcca25a96b5e70164bb521268c
Author: Hans Donner <hans@hansdonner.nl>
Commit: Hans Donner <hans@hansdonner.nl>

    add which-key-elipsis
---
 which-key.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/which-key.el b/which-key.el
index c71c741ee3..2828224c2f 100644
--- a/which-key.el
+++ b/which-key.el
@@ -128,6 +128,15 @@ the default is \" : \"."
   :group 'which-key
   :type 'string)
 
+(defcustom which-key-elipsis
+  (if which-key-dont-use-unicode ".." "…")
+  "Elipsis to use when truncating. Default is \"…\", unless
+`which-key-dont-use-unicode' is non nil, in which case
+the default is \"..\"."
+  :group 'which-key
+  :type 'string)
+
+
 (defcustom which-key-prefix-prefix "+"
   "String to insert in front of prefix commands (i.e., commands
 that represent a sub-map). Default is \"+\"."
@@ -1575,7 +1584,7 @@ If KEY contains any \"special keys\" defined in
 (defsubst which-key--truncate-description (desc)
   "Truncate DESC description to `which-key-max-description-length'."
   (let* ((last-face (get-text-property (1- (length desc)) 'face desc))
-         (dots (which-key--propertize ".." 'face last-face)))
+         (dots (which-key--propertize which-key-elipsis 'face last-face)))
     (if (and which-key-max-description-length
              (> (length desc) which-key-max-description-length))
         (concat (substring desc 0 which-key-max-description-length) dots)



reply via email to

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