[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc.el [emacs-unicode-2] |
Date: |
Wed, 08 Dec 2004 01:05:18 -0500 |
Index: emacs/lisp/calc/calc.el
diff -c emacs/lisp/calc/calc.el:1.21.4.7 emacs/lisp/calc/calc.el:1.21.4.8
*** emacs/lisp/calc/calc.el:1.21.4.7 Fri Nov 12 02:53:01 2004
--- emacs/lisp/calc/calc.el Wed Dec 8 05:02:18 2004
***************
*** 203,241 ****
;;; Code:
- (provide 'calc)
(require 'calc-macs)
- ;;; The "###autoload" comment will be used by Emacs version 19 for
- ;;; maintaining the loaddefs.el file automatically.
-
- ;;;###autoload
- (defvar calc-info-filename "calc.info"
- "*File name in which to look for the Calculator's Info documentation.")
-
;;;###autoload
(defvar calc-settings-file user-init-file
"*File in which to record permanent settings; default is `user-init-file'.")
- ;;;###autoload
- (defvar calc-autoload-directory nil
- "Name of directory from which additional \".elc\" files for Calc should be
- loaded. Should include a trailing \"/\".
- If nil, use original installation directory.
- This can safely be nil as long as the Calc files are on the load-path.")
-
- ;;;###autoload
- (defvar calc-gnuplot-name "gnuplot"
- "*Name of GNUPLOT program, for calc-graph features.")
-
- ;;;###autoload
- (defvar calc-gnuplot-plot-command nil
- "*Name of command for displaying GNUPLOT output; %s = file name to print.")
-
- ;;;###autoload
- (defvar calc-gnuplot-print-command "lp %s"
- "*Name of command for printing GNUPLOT output; %s = file name to print.")
-
(defvar calc-bug-address "address@hidden"
"Address of the author of Calc, for use by `report-calc-bug'.")
--- 203,214 ----
***************
*** 243,257 ****
"If t, scan keymaps to find all DEL-like keys.
if nil, only DEL itself is mapped to calc-pop.")
- (defvar calc-extensions-loaded nil)
-
(defvar calc-stack '((top-of-stack 1 nil))
"Calculator stack.
Entries are 3-lists: Formula, Height (in lines), Selection (or nil).")
- (defvar calc-show-banner t
- "*If non-nil, show a friendly greeting above the stack.")
-
(defvar calc-stack-top 1
"Index into `calc-stack' of \"top\" of stack.
This is 1 unless `calc-truncate-stack' has been used.")
--- 216,225 ----
***************
*** 589,595 ****
(calc-invocation-macro nil)
! (calc-show-banner t))
"List of variables (and default values) used in customizing GNU Calc.")
(mapcar (function (lambda (v)
--- 557,564 ----
(calc-invocation-macro nil)
! (calc-show-banner t
! "*If non-nil, show a friendly greeting above the stack."))
"List of variables (and default values) used in customizing GNU Calc.")
(mapcar (function (lambda (v)
***************
*** 704,717 ****
(directory-file-name
(file-name-directory
(expand-file-name
! name (car p2))))))))))
!
! ;; If calc-autoload-directory is given, use that (and hope it works!).
! (and calc-autoload-directory
! (not (equal calc-autoload-directory ""))
! (setq load-path (nconc load-path
! (list (directory-file-name
! calc-autoload-directory)))))))
;; The following modes use specially-formatted data.
(put 'calc-mode 'mode-class 'special)
--- 673,679 ----
(directory-file-name
(file-name-directory
(expand-file-name
! name (car p2))))))))))))
;; The following modes use specially-formatted data.
(put 'calc-mode 'mode-class 'special)
***************
*** 919,939 ****
( ?? . calc-dispatch-help ) ))
map))
- (autoload 'calc-extensions "calc-ext")
- (autoload 'calc-need-macros "calc-macs")
-
;;;; (Autoloads here)
(mapcar
(lambda (x) (dolist (func (cdr x)) (autoload func (car x))))
'(
! ("calc-aent" calc-Need-calc-aent calc-alg-digit-entry calc-alg-entry
calc-check-user-syntax calc-do-alg-entry calc-do-calc-eval
calc-do-quick-calc calc-match-user-syntax math-build-parse-table
math-find-user-tokens math-read-expr-list math-read-exprs math-read-if
math-read-token math-remove-dashes)
! ("calc-misc" calc-Need-calc-misc
calc-do-handle-whys calc-do-refresh calc-num-prefix-name
calc-record-list calc-record-why calc-report-bug calc-roll-down-stack
calc-roll-up-stack calc-temp-minibuffer-message calcFunc-floor
--- 881,900 ----
( ?? . calc-dispatch-help ) ))
map))
;;;; (Autoloads here)
(mapcar
(lambda (x) (dolist (func (cdr x)) (autoload func (car x))))
'(
! ("calc-aent" calc-alg-digit-entry calc-alg-entry
calc-check-user-syntax calc-do-alg-entry calc-do-calc-eval
calc-do-quick-calc calc-match-user-syntax math-build-parse-table
math-find-user-tokens math-read-expr-list math-read-exprs math-read-if
math-read-token math-remove-dashes)
! ("calc-embed" calc-do-embedded-activate)
!
! ("calc-misc"
calc-do-handle-whys calc-do-refresh calc-num-prefix-name
calc-record-list calc-record-why calc-report-bug calc-roll-down-stack
calc-roll-up-stack calc-temp-minibuffer-message calcFunc-floor
***************
*** 991,997 ****
(message "")
(if key
(progn
! (or (commandp key) (calc-extensions))
(call-interactively key))
(beep))))
--- 952,958 ----
(message "")
(if key
(progn
! (or (commandp key) (require 'calc-ext))
(call-interactively key))
(beep))))
***************
*** 1006,1014 ****
(progn
(use-global-map map)
(use-local-map nil)
! (read-key-sequence
! (if (commandp (key-binding (vector (cdr key))))
! "" prompt2)))
(use-global-map glob)
(use-local-map loc)))))
--- 967,973 ----
(progn
(use-global-map map)
(use-local-map nil)
! (read-key-sequence nil))
(use-global-map glob)
(use-local-map loc)))))
***************
*** 1050,1056 ****
(lambda (v) (set-default v (symbol-value v)))) calc-local-var-list)
(kill-all-local-variables)
(use-local-map (if (eq calc-algebraic-mode 'total)
! (progn (calc-extensions) calc-alg-map) calc-mode-map))
(mapcar (function (lambda (v) (make-local-variable v))) calc-local-var-list)
(make-local-variable 'overlay-arrow-position)
(make-local-variable 'overlay-arrow-string)
--- 1009,1015 ----
(lambda (v) (set-default v (symbol-value v)))) calc-local-var-list)
(kill-all-local-variables)
(use-local-map (if (eq calc-algebraic-mode 'total)
! (progn (require 'calc-ext) calc-alg-map) calc-mode-map))
(mapcar (function (lambda (v) (make-local-variable v))) calc-local-var-list)
(make-local-variable 'overlay-arrow-position)
(make-local-variable 'overlay-arrow-string)
***************
*** 1090,1097 ****
(setq plist (cdr (cdr plist))))
(if plist
(save-excursion
! (calc-extensions)
! (calc-need-macros)
(set-buffer "*Calculator*")
(while plist
(put 'calc-define (car plist) nil)
--- 1049,1056 ----
(setq plist (cdr (cdr plist))))
(if plist
(save-excursion
! (require 'calc-ext)
! (require 'calc-macs)
(set-buffer "*Calculator*")
(while plist
(put 'calc-define (car plist) nil)
***************
*** 1137,1145 ****
(calc-mode))
(setq max-lisp-eval-depth (max max-lisp-eval-depth 1000))
(when calc-always-load-extensions
! (calc-extensions))
(when calc-language
! (calc-extensions)
(calc-set-language calc-language calc-language-option t)))
;;;###autoload
--- 1096,1104 ----
(calc-mode))
(setq max-lisp-eval-depth (max max-lisp-eval-depth 1000))
(when calc-always-load-extensions
! (require 'calc-ext))
(when calc-language
! (require 'calc-ext)
(calc-set-language calc-language calc-language-option t)))
;;;###autoload
***************
*** 1148,1154 ****
(interactive "P\ni\np")
(if arg
(unless (eq arg 0)
! (calc-extensions)
(if (= (prefix-numeric-value arg) -1)
(calc-grab-region (region-beginning) (region-end) nil)
(when (= (prefix-numeric-value arg) -2)
--- 1107,1113 ----
(interactive "P\ni\np")
(if arg
(unless (eq arg 0)
! (require 'calc-ext)
(if (= (prefix-numeric-value arg) -1)
(calc-grab-region (region-beginning) (region-end) nil)
(when (= (prefix-numeric-value arg) -2)
***************
*** 1272,1278 ****
In this mode, click on the Calc \"buttons\" using the left mouse button.
Or, position the cursor manually and do M-x calc-keypad-press."
(interactive "p")
! (calc-extensions)
(calc-do-keypad calc-full-mode interactive))
;;;###autoload
--- 1231,1237 ----
In this mode, click on the Calc \"buttons\" using the left mouse button.
Or, position the cursor manually and do M-x calc-keypad-press."
(interactive "p")
! (require 'calc-ext)
(calc-do-keypad calc-full-mode interactive))
;;;###autoload
***************
*** 1280,1286 ****
"Invoke the Calculator in full-screen \"visual keypad\" mode.
See calc-keypad for details."
(interactive "p")
! (calc-extensions)
(calc-do-keypad t interactive))
--- 1239,1245 ----
"Invoke the Calculator in full-screen \"visual keypad\" mode.
See calc-keypad for details."
(interactive "p")
! (require 'calc-ext)
(calc-do-keypad t interactive))
***************
*** 1294,1300 ****
(calc-check-defines)
(let* ((calc-command-flags nil)
(calc-start-time (and calc-timing (not calc-start-time)
! (calc-extensions)
(current-time-string)))
(gc-cons-threshold (max gc-cons-threshold
(if calc-timing 2000000 100000)))
--- 1253,1259 ----
(calc-check-defines)
(let* ((calc-command-flags nil)
(calc-start-time (and calc-timing (not calc-start-time)
! (require 'calc-ext)
(current-time-string)))
(gc-cons-threshold (max gc-cons-threshold
(if calc-timing 2000000 100000)))
***************
*** 1307,1313 ****
(calc-embedded-select-buffer)
(calc-select-buffer))
(and (eq calc-algebraic-mode 'total)
! (calc-extensions)
(use-local-map calc-alg-map))
(when (and do-slow calc-display-working-message)
(message "Working...")
--- 1266,1272 ----
(calc-embedded-select-buffer)
(calc-select-buffer))
(and (eq calc-algebraic-mode 'total)
! (require 'calc-ext)
(use-local-map calc-alg-map))
(when (and do-slow calc-display-working-message)
(message "Working...")
***************
*** 1582,1588 ****
(defun calc-normalize (val)
(if (memq calc-simplify-mode '(nil none num))
(math-normalize val)
! (calc-extensions)
(calc-normalize-fancy val)))
(defun calc-handle-whys ()
--- 1541,1547 ----
(defun calc-normalize (val)
(if (memq calc-simplify-mode '(nil none num))
(math-normalize val)
! (require 'calc-ext)
(calc-normalize-fancy val)))
(defun calc-handle-whys ()
***************
*** 1862,1868 ****
(calc-enter-result 2 name (cons (or func2 func)
(mapcar 'math-check-complete
(calc-top-list 2))))
! (calc-extensions)
(calc-binary-op-fancy name func arg ident unary)))
(defun calc-unary-op (name func arg &optional func2)
--- 1821,1827 ----
(calc-enter-result 2 name (cons (or func2 func)
(mapcar 'math-check-complete
(calc-top-list 2))))
! (require 'calc-ext)
(calc-binary-op-fancy name func arg ident unary)))
(defun calc-unary-op (name func arg &optional func2)
***************
*** 1870,1876 ****
(if (null arg)
(calc-enter-result 1 name (list (or func2 func)
(math-check-complete (calc-top 1))))
! (calc-extensions)
(calc-unary-op-fancy name func arg)))
--- 1829,1835 ----
(if (null arg)
(calc-enter-result 1 name (list (or func2 func)
(math-check-complete (calc-top 1))))
! (require 'calc-ext)
(calc-unary-op-fancy name func arg)))
***************
*** 1982,1988 ****
calc-digit-value))))))
(if (eq calc-prev-char 'dots)
(progn
! (calc-extensions)
(calc-dots)))))))
(defsubst calc-minibuffer-size ()
--- 1941,1947 ----
calc-digit-value))))))
(if (eq calc-prev-char 'dots)
(progn
! (require 'calc-ext)
(calc-dots)))))))
(defsubst calc-minibuffer-size ()
***************
*** 2106,2112 ****
(if (and (eq this-command last-command)
(eq last-command-char ?.))
(progn
! (calc-extensions)
(calc-digit-dots))
(delete-backward-char 1)
(beep)
--- 2065,2071 ----
(if (and (eq this-command last-command)
(eq last-command-char ?.))
(progn
! (require 'calc-ext)
(calc-digit-dots))
(delete-backward-char 1)
(beep)
***************
*** 2281,2291 ****
(integerp (car math-normalize-a))
(and (consp (car math-normalize-a))
(not (eq (car (car math-normalize-a)) 'lambda))))
! (calc-extensions)
(math-normalize-fancy math-normalize-a))
(t
(or (and calc-simplify-mode
! (calc-extensions)
(math-normalize-nonstandard))
(let ((args (mapcar 'math-normalize (cdr math-normalize-a))))
(or (condition-case err
--- 2240,2250 ----
(integerp (car math-normalize-a))
(and (consp (car math-normalize-a))
(not (eq (car (car math-normalize-a)) 'lambda))))
! (require 'calc-ext)
(math-normalize-fancy math-normalize-a))
(t
(or (and calc-simplify-mode
! (require 'calc-ext)
(math-normalize-nonstandard))
(let ((args (mapcar 'math-normalize (cdr math-normalize-a))))
(or (condition-case err
***************
*** 2302,2308 ****
(progn
(or (eq var-EvalRules math-eval-rules-cache-tag)
(progn
! (calc-extensions)
(math-recompile-eval-rules)))
(and (or math-eval-rules-cache-other
(assq (car math-normalize-a)
--- 2261,2267 ----
(progn
(or (eq var-EvalRules math-eval-rules-cache-tag)
(progn
! (require 'calc-ext)
(math-recompile-eval-rules)))
(and (or math-eval-rules-cache-other
(assq (car math-normalize-a)
***************
*** 2315,2322 ****
(apply (cdr func) args)
(and (or (consp (car math-normalize-a))
(fboundp (car math-normalize-a))
! (and (not calc-extensions-loaded)
! (calc-extensions)
(fboundp (car math-normalize-a))))
(apply (car math-normalize-a) args)))))
(wrong-number-of-arguments
--- 2274,2281 ----
(apply (cdr func) args)
(and (or (consp (car math-normalize-a))
(fboundp (car math-normalize-a))
! (and (not (featurep 'calc-ext))
! (require 'calc-ext)
(fboundp (car math-normalize-a))))
(apply (car math-normalize-a) args)))))
(wrong-number-of-arguments
***************
*** 2584,2590 ****
(cons 'bigpos diff))))
(cons 'bigpos (math-add-bignum (cdr a) (cdr b)))))))
(and (Math-ratp a) (Math-ratp b)
! (calc-extensions)
(calc-add-fractions a b))
(and (Math-realp a) (Math-realp b)
(progn
--- 2543,2549 ----
(cons 'bigpos diff))))
(cons 'bigpos (math-add-bignum (cdr a) (cdr b)))))))
(and (Math-ratp a) (Math-ratp b)
! (require 'calc-ext)
(calc-add-fractions a b))
(and (Math-realp a) (Math-realp b)
(progn
***************
*** 2593,2601 ****
(or (and (consp b) (eq (car b) 'float))
(setq b (math-float b)))
(math-add-float a b)))
! (and (calc-extensions)
(math-add-objects-fancy a b))))
! (and (calc-extensions)
(math-add-symb-fancy a b))))
(defun math-add-bignum (a b) ; [L L L; l l l]
--- 2552,2560 ----
(or (and (consp b) (eq (car b) 'float))
(setq b (math-float b)))
(math-add-float a b)))
! (and (require 'calc-ext)
(math-add-objects-fancy a b))))
! (and (require 'calc-ext)
(math-add-symb-fancy a b))))
(defun math-add-bignum (a b) ; [L L L; l l l]
***************
*** 2724,2735 ****
(and (Math-zerop a) (not (eq (car-safe b) 'mod))
(if (Math-scalarp b)
(if (and (math-floatp b) (Math-ratp a)) (math-float a) a)
! (calc-extensions)
(math-mul-zero a b)))
(and (Math-zerop b) (not (eq (car-safe a) 'mod))
(if (Math-scalarp a)
(if (and (math-floatp a) (Math-ratp b)) (math-float b) b)
! (calc-extensions)
(math-mul-zero b a)))
(and (Math-objvecp a) (Math-objvecp b)
(or
--- 2683,2694 ----
(and (Math-zerop a) (not (eq (car-safe b) 'mod))
(if (Math-scalarp b)
(if (and (math-floatp b) (Math-ratp a)) (math-float a) a)
! (require 'calc-ext)
(math-mul-zero a b)))
(and (Math-zerop b) (not (eq (car-safe a) 'mod))
(if (Math-scalarp a)
(if (and (math-floatp a) (Math-ratp b)) (math-float b) b)
! (require 'calc-ext)
(math-mul-zero b a)))
(and (Math-objvecp a) (Math-objvecp b)
(or
***************
*** 2745,2751 ****
(math-mul-bignum-digit (cdr a) (nth 1 b) 0))
(math-mul-bignum-digit (cdr b) (nth 1 a) 0))))))
(and (Math-ratp a) (Math-ratp b)
! (calc-extensions)
(calc-mul-fractions a b))
(and (Math-realp a) (Math-realp b)
(progn
--- 2704,2710 ----
(math-mul-bignum-digit (cdr a) (nth 1 b) 0))
(math-mul-bignum-digit (cdr b) (nth 1 a) 0))))))
(and (Math-ratp a) (Math-ratp b)
! (require 'calc-ext)
(calc-mul-fractions a b))
(and (Math-realp a) (Math-realp b)
(progn
***************
*** 2755,2763 ****
(setq b (math-float b)))
(math-make-float (math-mul (nth 1 a) (nth 1 b))
(+ (nth 2 a) (nth 2 b)))))
! (and (calc-extensions)
(math-mul-objects-fancy a b))))
! (and (calc-extensions)
(math-mul-symb-fancy a b))))
(defun math-infinitep (a &optional undir)
--- 2714,2722 ----
(setq b (math-float b)))
(math-make-float (math-mul (nth 1 a) (nth 1 b))
(+ (nth 2 a) (nth 2 b)))))
! (and (require 'calc-ext)
(math-mul-objects-fancy a b))))
! (and (require 'calc-ext)
(math-mul-symb-fancy a b))))
(defun math-infinitep (a &optional undir)
***************
*** 2913,2924 ****
(defun math-div (a b)
(or
(and (Math-zerop b)
! (calc-extensions)
(math-div-by-zero a b))
(and (Math-zerop a) (not (eq (car-safe b) 'mod))
(if (Math-scalarp b)
(if (and (math-floatp b) (Math-ratp a)) (math-float a) a)
! (calc-extensions)
(math-div-zero a b)))
(and (Math-objvecp a) (Math-objvecp b)
(or
--- 2872,2883 ----
(defun math-div (a b)
(or
(and (Math-zerop b)
! (require 'calc-ext)
(math-div-by-zero a b))
(and (Math-zerop a) (not (eq (car-safe b) 'mod))
(if (Math-scalarp b)
(if (and (math-floatp b) (Math-ratp a)) (math-float a) a)
! (require 'calc-ext)
(math-div-zero a b)))
(and (Math-objvecp a) (Math-objvecp b)
(or
***************
*** 2928,2939 ****
(car q)
(if calc-prefer-frac
(progn
! (calc-extensions)
(math-make-frac a b))
(math-div-float (math-make-float a 0)
(math-make-float b 0))))))
(and (Math-ratp a) (Math-ratp b)
! (calc-extensions)
(calc-div-fractions a b))
(and (Math-realp a) (Math-realp b)
(progn
--- 2887,2898 ----
(car q)
(if calc-prefer-frac
(progn
! (require 'calc-ext)
(math-make-frac a b))
(math-div-float (math-make-float a 0)
(math-make-float b 0))))))
(and (Math-ratp a) (Math-ratp b)
! (require 'calc-ext)
(calc-div-fractions a b))
(and (Math-realp a) (Math-realp b)
(progn
***************
*** 2942,2950 ****
(or (and (consp b) (eq (car b) 'float))
(setq b (math-float b)))
(math-div-float a b)))
! (and (calc-extensions)
(math-div-objects-fancy a b))))
! (and (calc-extensions)
(math-div-symb-fancy a b))))
(defun math-div-float (a b) ; [F F F]
--- 2901,2909 ----
(or (and (consp b) (eq (car b) 'float))
(setq b (math-float b)))
(math-div-float a b)))
! (and (require 'calc-ext)
(math-div-objects-fancy a b))))
! (and (require 'calc-ext)
(math-div-symb-fancy a b))))
(defun math-div-float (a b) ; [F F F]
***************
*** 2973,2979 ****
(memq calc-language '(nil flat unform))
(null math-comp-selected))
(math-format-number a))
! (t (calc-extensions)
(math-compose-expr a 0))))
(off (math-stack-value-offset c))
s w)
--- 2932,2938 ----
(memq calc-language '(nil flat unform))
(null math-comp-selected))
(math-format-number a))
! (t (require 'calc-ext)
(math-compose-expr a 0))))
(off (math-stack-value-offset c))
s w)
***************
*** 2996,3002 ****
c)))
(unless (or (equal calc-right-label "")
(eq a 'top-of-stack))
! (calc-extensions)
(setq c (list 'horiz c
(make-string (max (- w (math-comp-width c)
(length calc-right-label)) 0) ? )
--- 2955,2961 ----
c)))
(unless (or (equal calc-right-label "")
(eq a 'top-of-stack))
! (require 'calc-ext)
(setq c (list 'horiz c
(make-string (max (- w (math-comp-width c)
(length calc-right-label)) 0) ? )
***************
*** 3016,3034 ****
(setcar (cdr entry) (calc-count-lines s))
s))
! (defun math-stack-value-offset (c)
(let* ((num (if calc-line-numbering 4 0))
! (wid (calc-window-width))
! off)
(if calc-display-just
(progn
! (calc-extensions)
(math-stack-value-offset-fancy))
! (setq off (or calc-display-origin 0))
(when (integerp calc-line-breaking)
! (setq wid calc-line-breaking)))
! (cons (max (- off (length calc-left-label)) 0)
! (+ wid num))))
(defun calc-count-lines (s)
(let ((pos 0)
--- 2975,2997 ----
(setcar (cdr entry) (calc-count-lines s))
s))
! ;; The variables math-svo-c, math-svo-wid and math-svo-off are local
! ;; to math-stack-value-offset, but are used by math-stack-value-offset-fancy
! ;; in calccomp.el.
!
! (defun math-stack-value-offset (math-svo-c)
(let* ((num (if calc-line-numbering 4 0))
! (math-svo-wid (calc-window-width))
! math-svo-off)
(if calc-display-just
(progn
! (require 'calc-ext)
(math-stack-value-offset-fancy))
! (setq math-svo-off (or calc-display-origin 0))
(when (integerp calc-line-breaking)
! (setq math-svo-wid calc-line-breaking)))
! (cons (max (- math-svo-off (length calc-left-label)) 0)
! (+ math-svo-wid num))))
(defun calc-count-lines (s)
(let ((pos 0)
***************
*** 3042,3048 ****
(if (and (Math-scalarp a)
(memq calc-language '(nil flat unform)))
(math-format-number a)
! (calc-extensions)
(let ((calc-line-breaking nil))
(math-composition-to-string (math-compose-expr a 0) w))))
--- 3005,3011 ----
(if (and (Math-scalarp a)
(memq calc-language '(nil flat unform)))
(math-format-number a)
! (require 'calc-ext)
(let ((calc-line-breaking nil))
(math-composition-to-string (math-compose-expr a 0) w))))
***************
*** 3078,3084 ****
(calc-language nil))
(math-format-number a)))
(t
! (calc-extensions)
(math-format-flat-expr-fancy a prec))))
--- 3041,3047 ----
(calc-language nil))
(math-format-number a)))
(t
! (require 'calc-ext)
(math-format-flat-expr-fancy a prec))))
***************
*** 3088,3094 ****
(cond
((eq calc-display-raw t) (format "%s" a))
((and (nth 1 calc-frac-format) (Math-integerp a))
! (calc-extensions)
(math-format-number (math-adjust-fraction a)))
((integerp a)
(if (not (or calc-group-digits calc-leading-zeros))
--- 3051,3057 ----
(cond
((eq calc-display-raw t) (format "%s" a))
((and (nth 1 calc-frac-format) (Math-integerp a))
! (require 'calc-ext)
(math-format-number (math-adjust-fraction a)))
((integerp a)
(if (not (or calc-group-digits calc-leading-zeros))
***************
*** 3096,3102 ****
(int-to-string a)
(if (< a 0)
(concat "-" (math-format-number (- a)))
! (calc-extensions)
(if math-radix-explicit-format
(if calc-radix-formatter
(funcall calc-radix-formatter
--- 3059,3065 ----
(int-to-string a)
(if (< a 0)
(concat "-" (math-format-number (- a)))
! (require 'calc-ext)
(if math-radix-explicit-format
(if calc-radix-formatter
(funcall calc-radix-formatter
***************
*** 3191,3197 ****
str (- eadj scale)))))))
str)))
(t
! (calc-extensions)
(math-format-number-fancy a prec))))
(defun math-format-bignum (a) ; [X L]
--- 3154,3160 ----
str (- eadj scale)))))))
str)))
(t
! (require 'calc-ext)
(math-format-number-fancy a prec))))
(defun math-format-bignum (a) ; [X L]
***************
*** 3199,3205 ****
(not calc-leading-zeros)
(not calc-group-digits))
(math-format-bignum-decimal a)
! (calc-extensions)
(math-format-bignum-fancy a)))
(defun math-format-bignum-decimal (a) ; [X L]
--- 3162,3168 ----
(not calc-leading-zeros)
(not calc-group-digits))
(math-format-bignum-decimal a)
! (require 'calc-ext)
(math-format-bignum-fancy a)))
(defun math-format-bignum-decimal (a) ; [X L]
***************
*** 3241,3247 ****
;; Forms that require extensions module
((string-match "[^-+0-9eE.]" s)
! (calc-extensions)
(math-read-number-fancy s))
;; Decimal point
--- 3204,3210 ----
;; Forms that require extensions module
((string-match "[^-+0-9eE.]" s)
! (require 'calc-ext)
(math-read-number-fancy s))
;; Decimal point
***************
*** 3350,3375 ****
(defun calc-grab-region (top bot arg)
"Parse the region as a vector of numbers and push it on the Calculator
stack."
(interactive "r\nP")
! (calc-extensions)
(calc-do-grab-region top bot arg))
;;;###autoload
(defun calc-grab-rectangle (top bot arg)
"Parse a rectangle as a matrix of numbers and push it on the Calculator
stack."
(interactive "r\nP")
! (calc-extensions)
(calc-do-grab-rectangle top bot arg))
(defun calc-grab-sum-down (top bot arg)
"Parse a rectangle as a matrix of numbers and sum its columns."
(interactive "r\nP")
! (calc-extensions)
(calc-do-grab-rectangle top bot arg 'calcFunc-reduced))
(defun calc-grab-sum-across (top bot arg)
"Parse a rectangle as a matrix of numbers and sum its rows."
(interactive "r\nP")
! (calc-extensions)
(calc-do-grab-rectangle top bot arg 'calcFunc-reducea))
--- 3313,3338 ----
(defun calc-grab-region (top bot arg)
"Parse the region as a vector of numbers and push it on the Calculator
stack."
(interactive "r\nP")
! (require 'calc-ext)
(calc-do-grab-region top bot arg))
;;;###autoload
(defun calc-grab-rectangle (top bot arg)
"Parse a rectangle as a matrix of numbers and push it on the Calculator
stack."
(interactive "r\nP")
! (require 'calc-ext)
(calc-do-grab-rectangle top bot arg))
(defun calc-grab-sum-down (top bot arg)
"Parse a rectangle as a matrix of numbers and sum its columns."
(interactive "r\nP")
! (require 'calc-ext)
(calc-do-grab-rectangle top bot arg 'calcFunc-reduced))
(defun calc-grab-sum-across (top bot arg)
"Parse a rectangle as a matrix of numbers and sum its rows."
(interactive "r\nP")
! (require 'calc-ext)
(calc-do-grab-rectangle top bot arg 'calcFunc-reducea))
***************
*** 3377,3383 ****
(defun calc-embedded (arg &optional end obeg oend)
"Start Calc Embedded mode on the formula surrounding point."
(interactive "P")
! (calc-extensions)
(calc-do-embedded arg end obeg oend))
;;;###autoload
--- 3340,3346 ----
(defun calc-embedded (arg &optional end obeg oend)
"Start Calc Embedded mode on the formula surrounding point."
(interactive "P")
! (require 'calc-ext)
(calc-do-embedded arg end obeg oend))
;;;###autoload
***************
*** 3397,3403 ****
;;;###autoload
(defmacro defmath (func args &rest body) ; [Public]
! (calc-extensions)
(math-do-defmath func args body))
;;; Functions needed for Lucid Emacs support.
--- 3360,3366 ----
;;;###autoload
(defmacro defmath (func args &rest body) ; [Public]
! (require 'calc-ext)
(math-do-defmath func args body))
;;; Functions needed for Lucid Emacs support.
***************
*** 3425,3435 ****
(setq unread-command-events nil)))
(when calc-always-load-extensions
! (calc-extensions)
(calc-load-everything))
(run-hooks 'calc-load-hook)
;;; arch-tag: 0c3b170c-4ce6-4eaf-8d9b-5834d1fe938f
;;; calc.el ends here
--- 3388,3400 ----
(setq unread-command-events nil)))
(when calc-always-load-extensions
! (require 'calc-ext)
(calc-load-everything))
(run-hooks 'calc-load-hook)
+ (provide 'calc)
+
;;; arch-tag: 0c3b170c-4ce6-4eaf-8d9b-5834d1fe938f
;;; calc.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/calc/calc.el [emacs-unicode-2],
Miles Bader <=