+2008-09-02 Martin Rudalics <rudalics@gmx.at>
+
+ * calc/calc.el (calc-dispatch-map): Fix handling of upcased and
+ control-prefixed keys. (Bug #835)
+
2008-09-02 Chong Yidong <cyd@stupidchicken.com>
* image-mode.el (image-mode): Fix 2008-07-19 change.
(define-key map "\C-j" 'calc-over)
(define-key map "\C-y" 'calc-yank)
(define-key map [mouse-2] 'calc-yank)
-
+
(mapc (lambda (x) (define-key map (char-to-string x) 'undefined))
"lOW")
(mapc (lambda (x) (define-key map (char-to-string x) 'calc-missing-key))
(defvar calc-dispatch-map
(let ((map (make-keymap)))
(mapc (lambda (x)
- (define-key map (char-to-string (car x)) (cdr x))
- (when (string-match "abcdefhijklnopqrstuwxyz"
- (char-to-string (car x)))
- (define-key map (char-to-string (- (car x) ?a -1)) (cdr x)))
- (define-key map (format "\e%c" (car x)) (cdr x)))
+ (let* ((x-chr (car x))
+ (x-str (char-to-string x-chr))
+ (x-def (cdr x)))
+ (define-key map x-str x-def)
+ (when (string-match "[a-z]" x-str)
+ ;; Map upper case char to same definition.
+ (define-key map (upcase x-str) x-def)
+ (unless (string-match "[gmv]" x-str)
+ ;; Map control prefixed char to same definition.
+ (define-key map (vector (list 'control x-chr)) x-def)))
+ (define-key map (format "\e%c" x-chr) x-def)))
'( ( ?a . calc-embedded-activate )
( ?b . calc-big-or-small )
( ?c . calc )