comparison lisp/calc/calc.el @ 67189:50f4df2d357a

Change global keybinding for calc-dispatch to "\C-x*" (calc-dispatch-map): Add more keys for `calc-same-interface'.
author Jay Belanger <jay.p.belanger@gmail.com>
date Mon, 28 Nov 2005 22:12:59 +0000
parents 7e4742b0d788
children 6bf177f8065b 7beb78bc1f8e
comparison
equal deleted inserted replaced
67188:25c21897d6a9 67189:50f4df2d357a
814 "Hook run when starting embedded mode.") 814 "Hook run when starting embedded mode.")
815 815
816 ;; Verify that Calc is running on the right kind of system. 816 ;; Verify that Calc is running on the right kind of system.
817 (defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version)))) 817 (defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version))))
818 818
819 ;; Set up the standard keystroke (M-#) to run the Calculator, if that key
820 ;; has not yet been bound to anything. For best results, the user should
821 ;; do this before Calc is even loaded, so that M-# can auto-load Calc.
822 (or (global-key-binding "\e#") (global-set-key "\e#" 'calc-dispatch))
823
824 ;; Set up the autoloading linkage. 819 ;; Set up the autoloading linkage.
825 (let ((name (and (fboundp 'calc-dispatch) 820 (let ((name (and (fboundp 'calc-dispatch)
826 (eq (car-safe (symbol-function 'calc-dispatch)) 'autoload) 821 (eq (car-safe (symbol-function 'calc-dispatch)) 'autoload)
827 (nth 1 (symbol-function 'calc-dispatch)))) 822 (nth 1 (symbol-function 'calc-dispatch))))
828 (p load-path)) 823 (p load-path))
1044 ( ?u . calc-embedded-update-formula ) 1039 ( ?u . calc-embedded-update-formula )
1045 ( ?w . calc-embedded-word ) 1040 ( ?w . calc-embedded-word )
1046 ( ?x . calc-quit ) 1041 ( ?x . calc-quit )
1047 ( ?y . calc-copy-to-buffer ) 1042 ( ?y . calc-copy-to-buffer )
1048 ( ?z . calc-user-invocation ) 1043 ( ?z . calc-user-invocation )
1049 ( ?= . calc-embedded-update-formula )
1050 ( ?\' . calc-embedded-new-formula ) 1044 ( ?\' . calc-embedded-new-formula )
1051 ( ?\` . calc-embedded-edit ) 1045 ( ?\` . calc-embedded-edit )
1052 ( ?: . calc-grab-sum-down ) 1046 ( ?: . calc-grab-sum-down )
1053 ( ?_ . calc-grab-sum-across ) 1047 ( ?_ . calc-grab-sum-across )
1054 ( ?0 . calc-reset ) 1048 ( ?0 . calc-reset )
1049 ( ?? . calc-dispatch-help )
1055 ( ?# . calc-same-interface ) 1050 ( ?# . calc-same-interface )
1056 ( ?? . calc-dispatch-help ) )) 1051 ( ?& . calc-same-interface )
1052 ( ?\\ . calc-same-interface )
1053 ( ?= . calc-same-interface )
1054 ( ?* . calc-same-interface )
1055 ( ?/ . calc-same-interface )
1056 ( ?+ . calc-same-interface )
1057 ( ?- . calc-same-interface ) ))
1057 map)) 1058 map))
1058 1059
1059 ;;;; (Autoloads here) 1060 ;;;; (Autoloads here)
1060 (mapcar 1061 (mapcar
1061 (lambda (x) (dolist (func (cdr x)) (autoload func (car x)))) 1062 (lambda (x) (dolist (func (cdr x)) (autoload func (car x))))
1093 calc-pop-above calc-power calc-roll-down calc-roll-up 1094 calc-pop-above calc-power calc-roll-down calc-roll-up
1094 calc-shift-Y-prefix-help calc-tutorial calcDigit-letter 1095 calc-shift-Y-prefix-help calc-tutorial calcDigit-letter
1095 report-calc-bug))) 1096 report-calc-bug)))
1096 1097
1097 1098
1098 ;;;###autoload (global-set-key "\e#" 'calc-dispatch) 1099 ;;;###autoload (define-key ctl-x-map "*" 'calc-dispatch)
1099 1100
1100 ;;;###autoload 1101 ;;;###autoload
1101 (defun calc-dispatch (&optional arg) 1102 (defun calc-dispatch (&optional arg)
1102 "Invoke the GNU Emacs Calculator. See `calc-dispatch-help' for details." 1103 "Invoke the GNU Emacs Calculator. See `calc-dispatch-help' for details."
1103 (interactive "P") 1104 (interactive "P")
3532 (calc-do-embedded-activate arg cbuf)) 3533 (calc-do-embedded-activate arg cbuf))
3533 3534
3534 (defun calc-user-invocation () 3535 (defun calc-user-invocation ()
3535 (interactive) 3536 (interactive)
3536 (unless calc-invocation-macro 3537 (unless calc-invocation-macro
3537 (error "Use `Z I' inside Calc to define a `M-# Z' keyboard macro")) 3538 (error "Use `Z I' inside Calc to define a `C-x * Z' keyboard macro"))
3538 (execute-kbd-macro calc-invocation-macro nil)) 3539 (execute-kbd-macro calc-invocation-macro nil))
3539 3540
3540 ;;; User-programmability. 3541 ;;; User-programmability.
3541 3542
3542 ;;;###autoload 3543 ;;;###autoload