* lisp/subr.el (kbd-valid-p): Compare case-sensitively.
(save-match-data
(catch 'exit
(let ((prefixes
- "\\(A-\\)?\\(C-\\)?\\(H-\\)?\\(M-\\)?\\(S-\\)?\\(s-\\)?"))
+ "\\(A-\\)?\\(C-\\)?\\(H-\\)?\\(M-\\)?\\(S-\\)?\\(s-\\)?")
+ (case-fold-search nil))
(dolist (key (split-string keys " "))
;; Every key might have these modifiers, and they should be
;; in this order.
(should (kbd-valid-p "<mouse-1>"))
(should (kbd-valid-p "<Scroll_Lock>"))
+ (should (not (kbd-valid-p "c-x")))
(should (not (kbd-valid-p "C-xx")))
(should (not (kbd-valid-p "M-xx")))
(should (not (kbd-valid-p "M-x<TAB>"))))