summaryrefslogtreecommitdiff
path: root/lisp/calc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-alg.el19
-rw-r--r--lisp/calc/calc-ext.el38
2 files changed, 23 insertions, 34 deletions
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index 728acf5b0f1..274f399fe6a 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -415,17 +415,14 @@
(defmacro math-defsimplify (funcs &rest code)
- (append '(progn)
- (mapcar (function
- (lambda (func)
- (list 'put (list 'quote func) ''math-simplify
- (list 'nconc
- (list 'get (list 'quote func) ''math-simplify)
- (list 'list
- (list 'function
- (append '(lambda (math-simplify-expr))
- code)))))))
- (if (symbolp funcs) (list funcs) funcs))))
+ (cons 'progn
+ (mapcar #'(lambda (func)
+ `(put ',func 'math-simplify
+ (nconc
+ (get ',func 'math-simplify)
+ (list
+ #'(lambda (math-simplify-expr) ,@code)))))
+ (if (symbolp funcs) (list funcs) funcs))))
(put 'math-defsimplify 'lisp-indent-hook 1)
;; The function created by math-defsimplify uses the variable
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 9ea773fbb98..6e05cdb07e5 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -2872,33 +2872,25 @@ If X is not an error form, return 1."
(defmacro math-defintegral (funcs &rest code)
(setq math-integral-cache nil)
- (append '(progn)
- (mapcar (function
- (lambda (func)
- (list 'put (list 'quote func) ''math-integral
- (list 'nconc
- (list 'get (list 'quote func) ''math-integral)
- (list 'list
- (list 'function
- (append '(lambda (u))
- code)))))))
- (if (symbolp funcs) (list funcs) funcs))))
+ (cons 'progn
+ (mapcar #'(lambda (func)
+ `(put ',func 'math-integral
+ (nconc
+ (get ',func 'math-integral)
+ (list
+ #'(lambda (u) ,@code)))))
+ (if (symbolp funcs) (list funcs) funcs))))
(put 'math-defintegral 'lisp-indent-hook 1)
(defmacro math-defintegral-2 (funcs &rest code)
(setq math-integral-cache nil)
- (append '(progn)
- (mapcar (function
- (lambda (func)
- (list 'put (list 'quote func) ''math-integral-2
- (list 'nconc
- (list 'get (list 'quote func)
- ''math-integral-2)
- (list 'list
- (list 'function
- (append '(lambda (u v))
- code)))))))
- (if (symbolp funcs) (list funcs) funcs))))
+ (cons 'progn
+ (mapcar #'(lambda (func)
+ `(put ',func 'math-integral-2
+ `(nconc
+ (get ',func 'math-integral-2)
+ (list #'(lambda (u v) ,@code)))))
+ (if (symbolp funcs) (list funcs) funcs))))
(put 'math-defintegral-2 'lisp-indent-hook 1)
(defvar var-IntegAfterRules 'calc-IntegAfterRules)