read-multiple-choice: Improve key formatting

* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve
formatting of key missing in the description.  Use face help-key-name
on terminals that can't display underline.
This commit is contained in:
Stefan Kangas 2021-12-27 20:25:50 +01:00
parent 1f792c2bc1
commit e2a7e5f409

View file

@ -38,10 +38,10 @@
;; Not in the name string, or a special character.
((or (not pos)
(member desc '("ESC" "TAB" "RET" "DEL" "SPC")))
(format "[%s] %s"
(format "%s %s"
(if graphical-terminal
(propertize desc 'face 'read-multiple-choice-face)
desc)
(propertize desc 'face 'help-key-name))
name))
;; The prompt character is in the name, so highlight
;; it on graphical terminals.