diff options
| author | Lars Ingebrigtsen | 2021-10-18 07:37:08 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-10-18 07:37:08 +0200 |
| commit | 595dcf88fd880a1c96fb7bb462ac53fedd2eb744 (patch) | |
| tree | 52d075a16f121a6c5bc2359757ddca6cfe6b5fa8 | |
| parent | 735086e440aa748072be547f04c8878ac3798723 (diff) | |
| download | emacs-595dcf88fd880a1c96fb7bb462ac53fedd2eb744.tar.gz emacs-595dcf88fd880a1c96fb7bb462ac53fedd2eb744.zip | |
Do kbd-valid-p prefix comparisons case-sensitively
* lisp/subr.el (kbd-valid-p): Compare case-sensitively.
| -rw-r--r-- | lisp/subr.el | 3 | ||||
| -rw-r--r-- | test/lisp/subr-tests.el | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index f2cbe363403..78709b7fa9c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -941,7 +941,8 @@ which is | |||
| 941 | (save-match-data | 941 | (save-match-data |
| 942 | (catch 'exit | 942 | (catch 'exit |
| 943 | (let ((prefixes | 943 | (let ((prefixes |
| 944 | "\\(A-\\)?\\(C-\\)?\\(H-\\)?\\(M-\\)?\\(S-\\)?\\(s-\\)?")) | 944 | "\\(A-\\)?\\(C-\\)?\\(H-\\)?\\(M-\\)?\\(S-\\)?\\(s-\\)?") |
| 945 | (case-fold-search nil)) | ||
| 945 | (dolist (key (split-string keys " ")) | 946 | (dolist (key (split-string keys " ")) |
| 946 | ;; Every key might have these modifiers, and they should be | 947 | ;; Every key might have these modifiers, and they should be |
| 947 | ;; in this order. | 948 | ;; in this order. |
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 3e6a7a8bd88..238c9be1ab0 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el | |||
| @@ -311,6 +311,7 @@ | |||
| 311 | (should (kbd-valid-p "<mouse-1>")) | 311 | (should (kbd-valid-p "<mouse-1>")) |
| 312 | (should (kbd-valid-p "<Scroll_Lock>")) | 312 | (should (kbd-valid-p "<Scroll_Lock>")) |
| 313 | 313 | ||
| 314 | (should (not (kbd-valid-p "c-x"))) | ||
| 314 | (should (not (kbd-valid-p "C-xx"))) | 315 | (should (not (kbd-valid-p "C-xx"))) |
| 315 | (should (not (kbd-valid-p "M-xx"))) | 316 | (should (not (kbd-valid-p "M-xx"))) |
| 316 | (should (not (kbd-valid-p "M-x<TAB>")))) | 317 | (should (not (kbd-valid-p "M-x<TAB>")))) |