diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2005-01-19 17:21:44 +0000 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2005-01-19 17:21:44 +0000 |
commit | 17c90a9e65944b394a619f57dce33c5e8c04f549 (patch) | |
tree | acbe54f2f94183ef4a5d5ec8ebaebaa001ed9f5a /lisp/calc | |
parent | 8423891cfdd1958e2ca0599ee4ff9b965cac4669 (diff) | |
download | emacs-17c90a9e65944b394a619f57dce33c5e8c04f549.tar.gz emacs-17c90a9e65944b394a619f57dce33c5e8c04f549.tar.bz2 emacs-17c90a9e65944b394a619f57dce33c5e8c04f549.zip |
(calc-user-define-edit): Put original formula in formula editing buffer.
Diffstat (limited to 'lisp/calc')
-rw-r--r-- | lisp/calc/calc-prog.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 33d183b5c8c..a37f3c5cedd 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -702,15 +702,17 @@ (intcmd (symbol-name (cdr def))) (algcmd (substring (symbol-name func) 9))) (if (and defn (calc-valid-formula-func func)) - (progn + (let ((niceexpr (math-format-nice-expr defn (frame-width)))) (calc-wrapper (calc-edit-mode (list 'calc-finish-formula-edit (list 'quote func)) nil - (format "Editing formula (%s, %s, bound to %s).\n" - intcmd algcmd kys)) + (format (concat + "Editing formula (%s, %s, bound to %s).\n" + "Original formula: %s\n") + intcmd algcmd kys niceexpr)) (insert (math-showing-full-precision - (math-format-nice-expr defn (frame-width))) + niceexpr) "\n")) (calc-show-edit-buffer)) (error "That command's definition cannot be edited"))))))) |