Function: math-defsimplify
math-defsimplify is an autoloaded macro defined in calc-alg.el.gz.
Signature
(math-defsimplify FUNCS &rest CODE)
Documentation
Define the simplification code for functions FUNCS.
Code can refer to the expression to simplify via lexical variable expr
and should return the simplified expression to use (or nil).
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-alg.el.gz
(defmacro math-defsimplify (funcs &rest code)
"Define the simplification code for functions FUNCS.
Code can refer to the expression to simplify via lexical variable `expr'
and should return the simplified expression to use (or nil)."
(declare (indent 1) (debug (sexp body)))
(cons 'progn
(mapcar (lambda (func)
`(put ',func 'math-simplify
(nconc
(get ',func 'math-simplify)
(list
(lambda (expr) ,@code)))))
(if (symbolp funcs) (list funcs) funcs))))