summaryrefslogtreecommitdiff
path: root/lisp/calc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-prog.el10
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")))))))