* lisp/help.el (substitute-command-keys): Add help-key-binding face to
mouse buttons in literal key substitutions.
* test/lisp/help-tests.el
(help-tests-substitute-command-keys/literal-key-sequence): Expand
test for above change.
(let ((k (buffer-substring-no-properties (+ orig-point 2)
end-point)))
(when (or (key-valid-p k)
+ (string-match-p "\\`mouse-[1-9]" k)
(string-match-p "\\`M-x " k))
(goto-char orig-point)
(delete-char 2)
(with-substitute-command-keys-test
(test "\\`C-m'" "C-m")
(test "\\`C-m'\\`C-j'" "C-mC-j")
- (test "foo\\`C-m'bar\\`C-j'baz" "fooC-mbarC-jbaz")))
+ (test "foo\\`C-m'bar\\`C-j'baz" "fooC-mbarC-jbaz")
+ (test "\\`M-x next-line'" "M-x next-line")
+ (test "\\`mouse-1'" "mouse-1")))
(ert-deftest help-tests-substitute-command-keys/literal-key-sequence-ignore-invalid ()
"Ignore any invalid literal key sequence."