Function: calc-sel-expand-formula
calc-sel-expand-formula is an autoloaded, interactive and
byte-compiled function defined in calc-sel.el.gz.
Signature
(calc-sel-expand-formula ARG)
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-sel.el.gz
(defun calc-sel-expand-formula (arg)
(interactive "p")
(calc-slow-wrapper
(calc-preserve-point)
(let* ((num (max 1 (calc-locate-cursor-element (point))))
(calc-sel-reselect calc-keep-selection)
(entry (calc-top num 'entry))
(sel (or (calc-auto-selection entry) (car entry))))
(calc-with-default-simplification
(let ((math-simplify-only nil))
(calc-modify-simplify-mode arg)
(let* ((math-expand-formulas (> arg 0))
(val (calc-normalize sel))
top)
(and (<= arg 0)
(setq top (math-expand-formula val))
(setq val (calc-normalize top)))
(setq val (calc-encase-atoms val))
(calc-pop-push-record-list 1 "jexf"
(list (calc-replace-sub-formula
(car entry) sel val))
num
(list (and calc-sel-reselect val))))))
(calc-handle-whys))))