816 |
;; Verify that Calc is running on the right kind of system. |
;; Verify that Calc is running on the right kind of system. |
817 |
(defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version)))) |
(defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version)))) |
818 |
|
|
|
;; Set up the standard keystroke (M-#) to run the Calculator, if that key |
|
|
;; has not yet been bound to anything. For best results, the user should |
|
|
;; do this before Calc is even loaded, so that M-# can auto-load Calc. |
|
|
(or (global-key-binding "\e#") (global-set-key "\e#" 'calc-dispatch)) |
|
|
|
|
819 |
;; Set up the autoloading linkage. |
;; Set up the autoloading linkage. |
820 |
(let ((name (and (fboundp 'calc-dispatch) |
(let ((name (and (fboundp 'calc-dispatch) |
821 |
(eq (car-safe (symbol-function 'calc-dispatch)) 'autoload) |
(eq (car-safe (symbol-function 'calc-dispatch)) 'autoload) |
1041 |
( ?x . calc-quit ) |
( ?x . calc-quit ) |
1042 |
( ?y . calc-copy-to-buffer ) |
( ?y . calc-copy-to-buffer ) |
1043 |
( ?z . calc-user-invocation ) |
( ?z . calc-user-invocation ) |
|
( ?= . calc-embedded-update-formula ) |
|
1044 |
( ?\' . calc-embedded-new-formula ) |
( ?\' . calc-embedded-new-formula ) |
1045 |
( ?\` . calc-embedded-edit ) |
( ?\` . calc-embedded-edit ) |
1046 |
( ?: . calc-grab-sum-down ) |
( ?: . calc-grab-sum-down ) |
1047 |
( ?_ . calc-grab-sum-across ) |
( ?_ . calc-grab-sum-across ) |
1048 |
( ?0 . calc-reset ) |
( ?0 . calc-reset ) |
1049 |
|
( ?? . calc-dispatch-help ) |
1050 |
( ?# . calc-same-interface ) |
( ?# . calc-same-interface ) |
1051 |
( ?? . calc-dispatch-help ) )) |
( ?& . 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 ) )) |
1058 |
map)) |
map)) |
1059 |
|
|
1060 |
;;;; (Autoloads here) |
;;;; (Autoloads here) |
1096 |
report-calc-bug))) |
report-calc-bug))) |
1097 |
|
|
1098 |
|
|
1099 |
;;;###autoload (global-set-key "\e#" 'calc-dispatch) |
;;;###autoload (define-key ctl-x-map "*" 'calc-dispatch) |
1100 |
|
|
1101 |
;;;###autoload |
;;;###autoload |
1102 |
(defun calc-dispatch (&optional arg) |
(defun calc-dispatch (&optional arg) |
3535 |
(defun calc-user-invocation () |
(defun calc-user-invocation () |
3536 |
(interactive) |
(interactive) |
3537 |
(unless calc-invocation-macro |
(unless calc-invocation-macro |
3538 |
(error "Use `Z I' inside Calc to define a `M-# Z' keyboard macro")) |
(error "Use `Z I' inside Calc to define a `C-x * Z' keyboard macro")) |
3539 |
(execute-kbd-macro calc-invocation-macro nil)) |
(execute-kbd-macro calc-invocation-macro nil)) |
3540 |
|
|
3541 |
;;; User-programmability. |
;;; User-programmability. |