Commit 63a6fb2a authored by Philip Kaludercic's avatar Philip Kaludercic
Browse files

Improve formatting of bindings in 'help-quick'

* lisp/help.el (help-quick): Prevent format's padding from extending
text properties beyond the initial string containing the key binding.
parent 5528bea8
Pipeline #26703 failed with stages
in 100 minutes and 55 seconds
......@@ -192,7 +192,7 @@ buffer.")
max-key-len (max (length key) max-key-len))
(push (list key (cdr ent) (car ent)) keys))))
(when keys
(let ((fmt (format "%%-%ds %%-%ds%s" max-key-len max-cmd-len
(let ((fmt (format "%%s %%-%ds%s" max-cmd-len
(make-string padding ?\s)))
(width (+ max-key-len 1 max-cmd-len padding)))
(push `(,width
......@@ -203,10 +203,12 @@ buffer.")
'face 'bold)
,@(mapcar (lambda (ent)
(format fmt
(propertize
(car ent)
'quick-help-cmd
(caddr ent))
(concat
(propertize
(car ent)
'quick-help-cmd
(caddr ent))
(make-string (- max-key-len (length (car ent))) ?\s))
(cadr ent)))
keys))
blocks)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment