emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 595dcf8: Do kbd-valid-p prefix comparisons case-sensitively


From: Lars Ingebrigtsen
Subject: master 595dcf8: Do kbd-valid-p prefix comparisons case-sensitively
Date: Mon, 18 Oct 2021 01:37:18 -0400 (EDT)

branch: master
commit 595dcf88fd880a1c96fb7bb462ac53fedd2eb744
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Do kbd-valid-p prefix comparisons case-sensitively
    
    * lisp/subr.el (kbd-valid-p): Compare case-sensitively.
---
 lisp/subr.el            | 3 ++-
 test/lisp/subr-tests.el | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index f2cbe36..78709b7 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -941,7 +941,8 @@ which is
        (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.
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 3e6a7a8..238c9be 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -311,6 +311,7 @@
   (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>"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]