]> git.eshelyaron.com Git - emacs.git/commitdiff
(event-apply-modifier): Fix off-by-one errors.
authorKarl Heuer <kwzh@gnu.org>
Tue, 4 Apr 1995 22:48:16 +0000 (22:48 +0000)
committerKarl Heuer <kwzh@gnu.org>
Tue, 4 Apr 1995 22:48:16 +0000 (22:48 +0000)
lisp/simple.el

index 0a4bb2a42480008b155adfb4d307acd32500da53..256a39eb2209f6ae1ce14c7c80ffc32e4e958659 100644 (file)
@@ -2835,11 +2835,11 @@ 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))
+            (if (and (<= (downcase event) ?z)
+                     (>= (downcase event) ?a))
                 (- (downcase event) ?a -1)
-              (if (and (< (downcase event) ?Z)
-                       (> (downcase event) ?A))
+              (if (and (<= (downcase event) ?Z)
+                       (>= (downcase event) ?A))
                   (- (downcase event) ?A -1)
                 (logior (lsh 1 lshiftby) event))))
            ((eq symbol 'shift)