* calc/calc-ext.el (calc-fancy-prefix-other-key): Don't clear
flags if the last command was a tab or M-tab.
+ * calc/calc-prog.el (calc-user-define-edit): Put original formula
+ in formula editing buffer.
+
2005-01-19 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gdb-put-breakpoint-icon): Add help-echo for
(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")))))))