emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 8c8bf7d: * lisp/simple.el (event-apply-modifier): M


From: Stefan Monnier
Subject: [Emacs-diffs] master 8c8bf7d: * lisp/simple.el (event-apply-modifier): Map control+[ to C-[
Date: Fri, 27 Jul 2018 16:45:10 -0400 (EDT)

branch: master
commit 8c8bf7db62af2c80537b5760bea01f7da9712a0e
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/simple.el (event-apply-modifier): Map control+[ to C-[
---
 lisp/simple.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 6459531..8d77047 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8346,14 +8346,12 @@ LSHIFTBY is the numeric value of this modifier, in 
keyboard events.
 PREFIX is the string that represents this modifier in an event type symbol."
   (if (numberp event)
       (cond ((eq symbol 'control)
-            (if (and (<= (downcase event) ?z)
-                     (>= (downcase event) ?a))
-                (- (downcase event) ?a -1)
-              (if (and (<= (downcase event) ?Z)
-                       (>= (downcase event) ?A))
-                  (- (downcase event) ?A -1)
-                (logior (lsh 1 lshiftby) event))))
+            (if (<= 64 (upcase event) 95)
+                (- (upcase event) 64)
+              (logior (lsh 1 lshiftby) event)))
            ((eq symbol 'shift)
+             ;; FIXME: Should we also apply this "upcase" behavior of shift
+             ;; to non-ascii letters?
             (if (and (<= (downcase event) ?z)
                      (>= (downcase event) ?a))
                 (upcase event)



reply via email to

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