# HG changeset patch # User Jay Belanger # Date 1106155234 0 # Node ID 292caf631179e4b7623bfa4627c2a4f8d455b5d6 # Parent 767c8c2a2d5c0dfbd22c7aada36c7fa29c8bac20 (calc-user-define-edit): Put original formula in formula editing buffer. diff -r 767c8c2a2d5c -r 292caf631179 lisp/calc/calc-prog.el --- a/lisp/calc/calc-prog.el Wed Jan 19 16:58:06 2005 +0000 +++ b/lisp/calc/calc-prog.el Wed Jan 19 17:20:34 2005 +0000 @@ -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")))))))