(format "%s %s"
(if graphical-terminal
(propertize desc 'face 'read-multiple-choice-face)
- (propertize desc 'face 'help-key-name))
+ (propertize desc 'face 'help-key-binding))
name))
;; The prompt character is in the name, so highlight
;; it on graphical terminals.
(should (equal (rmc--add-key-description '(?y "yes"))
'(?y . "yes")))
(should (equal (rmc--add-key-description '(?n "foo"))
- '(?n . "[n] foo")))
+ '(?n . "n foo")))
(should (equal (rmc--add-key-description '(?\s "foo bar"))
- `(?\s . "[SPC] foo bar")))))
+ `(?\s . "SPC foo bar")))))
(ert-deftest test-rmc--add-key-description/with-attributes ()
(cl-letf (((symbol-function 'display-supports-face-attributes-p) (lambda (_ _) t)))
`(?y . ,(concat (propertize "y" 'face 'read-multiple-choice-face) "es"))))
(should (equal-including-properties
(rmc--add-key-description '(?n "foo"))
- `(?n . ,(concat "[" (propertize "n" 'face 'read-multiple-choice-face) "] foo"))))
+ `(?n . ,(concat (propertize "n" 'face 'read-multiple-choice-face) " foo"))))
(should (equal-including-properties
(rmc--add-key-description '(?\s "foo bar"))
- `(?\s . ,(concat "[" (propertize "SPC" 'face 'read-multiple-choice-face) "] foo bar"))))))
+ `(?\s . ,(concat (propertize "SPC" 'face 'read-multiple-choice-face) " foo bar"))))))
(ert-deftest test-rmc--add-key-description/non-graphical-display ()
(cl-letf (((symbol-function 'display-supports-face-attributes-p) (lambda (_ _) nil)))
'(?y . "[Y]es")))
(should (equal-including-properties
(rmc--add-key-description '(?n "foo"))
- '(?n . "[n] foo")))))
+ `(?n . ,(concat (propertize "n" 'face 'help-key-binding) " foo"))))))
(ert-deftest test-read-multiple-choice ()
(dolist (char '(?y ?n))