aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calc/calc-misc.el
diff options
context:
space:
mode:
authorJay Belanger <[email protected]>2004-11-29 05:57:46 +0000
committerJay Belanger <[email protected]>2004-11-29 05:57:46 +0000
commitc6d32405298a96622723483112e2f09a79ce6fe5 (patch)
tree7e2bbac4b92b0d340277929e1e362c70a0a872cb /lisp/calc/calc-misc.el
parentf50dfd02cb491bd3fdbb18a8592eecb776ad3ada (diff)
(calc-do-handle-whys, calc-last-args-stub, calc-missing-key)
(calc-shift-Y-prefix-help, math-concat, math-trunc, math-floor) (calcFunc-inv, math-mod, math-pow): Replace calc-extensions by appropriate require. (calc-power): Replace calc-extensions-loaded by appropriate featurep.
Diffstat (limited to 'lisp/calc/calc-misc.el')
-rw-r--r--lisp/calc/calc-misc.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 07d5c8a157..a6f611052e 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -245,7 +245,7 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)."
(and (eq (car (car calc-why)) '*)
calc-auto-why)))
(progn
- (calc-extensions)
+ (require 'calc-ext)
(calc-explain-why (car calc-why)
(if (eq calc-auto-why t)
(cdr calc-why)
@@ -331,14 +331,14 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)."
(defun calc-last-args-stub (arg)
(interactive "p")
- (calc-extensions)
+ (require 'calc-ext)
(calc-last-args arg))
(defun calc-power (arg)
(interactive "P")
(calc-slow-wrapper
- (if (and calc-extensions-loaded
+ (if (and (featurep 'calc-ext)
(calc-is-inverse))
(calc-binary-op "root" 'calcFunc-nroot arg nil nil)
(calc-binary-op "^" 'calcFunc-pow arg nil nil '^))))
@@ -420,7 +420,7 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)."
When this key is used, calc-ext (the Calculator extensions module) will be
loaded and the keystroke automatically re-typed."
(interactive "P")
- (calc-extensions)
+ (require 'calc-ext)
(if (keymapp (key-binding (char-to-string last-command-char)))
(message "%s%c-" (calc-num-prefix-name n) last-command-char))
(calc-unread-command)
@@ -428,7 +428,7 @@ loaded and the keystroke automatically re-typed."
(defun calc-shift-Y-prefix-help ()
(interactive)
- (calc-extensions)
+ (require 'calc-ext)
(calc-do-prefix-help calc-Y-help-msgs "other" ?Y))
@@ -467,7 +467,7 @@ loaded and the keystroke automatically re-typed."
(defun math-concat (v1 v2)
(if (stringp v1)
(concat v1 v2)
- (calc-extensions)
+ (require 'calc-ext)
(if (and (or (math-objvecp v1) (math-known-scalarp v1))
(or (math-objvecp v2) (math-known-scalarp v2)))
(append (if (and (math-vectorp v1)
@@ -601,14 +601,14 @@ loaded and the keystroke automatically re-typed."
(defun math-trunc (a &optional math-trunc-prec)
(cond (math-trunc-prec
- (calc-extensions)
+ (require 'calc-ext)
(math-trunc-special a math-trunc-prec))
((Math-integerp a) a)
((Math-looks-negp a)
(math-neg (math-trunc (math-neg a))))
((eq (car a) 'float)
(math-scale-int (nth 1 a) (nth 2 a)))
- (t (calc-extensions)
+ (t (require 'calc-ext)
(math-trunc-fancy a))))
(defalias 'calcFunc-trunc 'math-trunc)
@@ -619,7 +619,7 @@ loaded and the keystroke automatically re-typed."
(defun math-floor (a &optional math-floor-prec) ; [Public]
(cond (math-floor-prec
- (calc-extensions)
+ (require 'calc-ext)
(math-floor-special a math-floor-prec))
((Math-integerp a) a)
((Math-messy-integerp a) (math-trunc a))
@@ -627,7 +627,7 @@ loaded and the keystroke automatically re-typed."
(if (Math-negp a)
(math-add (math-trunc a) -1)
(math-trunc a)))
- (t (calc-extensions)
+ (t (require 'calc-ext)
(math-floor-fancy a))))
(defalias 'calcFunc-floor 'math-floor)
@@ -643,7 +643,7 @@ loaded and the keystroke automatically re-typed."
(defun calcFunc-inv (m)
(if (Math-vectorp m)
(progn
- (calc-extensions)
+ (require 'calc-ext)
(if (math-square-matrixp m)
(or (math-with-extra-prec 2 (math-matrix-inv-raw m))
(math-reject-arg m "*Singular matrix"))
@@ -673,7 +673,7 @@ loaded and the keystroke automatically re-typed."
(math-imod a b))
((and (Math-anglep a) (Math-anglep b))
(math-sub a (math-mul (math-floor (math-div a b)) b)))
- (t (calc-extensions)
+ (t (require 'calc-ext)
(math-mod-fancy a b))))
@@ -686,7 +686,7 @@ loaded and the keystroke automatically re-typed."
((Math-zerop a)
(if (and (Math-scalarp b) (Math-posp b))
(if (math-floatp b) (math-float a) a)
- (calc-extensions)
+ (require 'calc-ext)
(math-pow-of-zero a b)))
((or (eq a 1) (eq b 1)) a)
((or (equal a '(float 1 0)) (equal b '(float 1 0))) a)
@@ -694,7 +694,7 @@ loaded and the keystroke automatically re-typed."
(if (Math-scalarp a)
(if (or (math-floatp a) (math-floatp b))
'(float 1 0) 1)
- (calc-extensions)
+ (require 'calc-ext)
(math-pow-zero a b)))
((and (Math-integerp b) (or (Math-numberp a) (Math-vectorp a)))
(if (and (equal a '(float 1 1)) (integerp b))
@@ -702,7 +702,7 @@ loaded and the keystroke automatically re-typed."
(math-with-extra-prec 2
(math-ipow a b))))
(t
- (calc-extensions)
+ (require 'calc-ext)
(math-pow-fancy a b))))
(defun math-ipow (a n) ; [O O I] [Public]