comparison lisp/simple.el @ 11201:f6caea9275af

(event-apply-modifier): Fix off-by-one errors.
author Karl Heuer <kwzh@gnu.org>
date Tue, 04 Apr 1995 22:48:16 +0000
parents edf66df6fbe9
children 60b7ab7d4fec
comparison
equal deleted inserted replaced
11200:dd83a62facea 11201:f6caea9275af
2833 SYMBOL is the name of this modifier, as a symbol. 2833 SYMBOL is the name of this modifier, as a symbol.
2834 LSHIFTBY is the numeric value of this modifier, in keyboard events. 2834 LSHIFTBY is the numeric value of this modifier, in keyboard events.
2835 PREFIX is the string that represents this modifier in an event type symbol." 2835 PREFIX is the string that represents this modifier in an event type symbol."
2836 (if (numberp event) 2836 (if (numberp event)
2837 (cond ((eq symbol 'control) 2837 (cond ((eq symbol 'control)
2838 (if (and (< (downcase event) ?z) 2838 (if (and (<= (downcase event) ?z)
2839 (> (downcase event) ?a)) 2839 (>= (downcase event) ?a))
2840 (- (downcase event) ?a -1) 2840 (- (downcase event) ?a -1)
2841 (if (and (< (downcase event) ?Z) 2841 (if (and (<= (downcase event) ?Z)
2842 (> (downcase event) ?A)) 2842 (>= (downcase event) ?A))
2843 (- (downcase event) ?A -1) 2843 (- (downcase event) ?A -1)
2844 (logior (lsh 1 lshiftby) event)))) 2844 (logior (lsh 1 lshiftby) event))))
2845 ((eq symbol 'shift) 2845 ((eq symbol 'shift)
2846 (if (and (<= (downcase event) ?z) 2846 (if (and (<= (downcase event) ?z)
2847 (>= (downcase event) ?a)) 2847 (>= (downcase event) ?a))