Function: math-expand-formula

math-expand-formula is an autoloaded and byte-compiled function defined in calc-alg.el.gz.

Signature

(math-expand-formula EXPR)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-alg.el.gz
;;; Try to expand a formula according to its definition.
(defun math-expand-formula (expr)
  (and (consp expr)
       (symbolp (car expr))
       (or (get (car expr) 'calc-user-defn)
	   (get (car expr) 'math-expandable))
       (let ((res (let ((math-expand-formulas t))
		    (apply (car expr) (cdr expr)))))
	 (and (not (eq (car-safe res) (car expr)))
	      res))))