From: Jack Coughlin Date: Thu, 18 Jul 2019 15:16:50 +0000 (-0700) Subject: Fix saving user-defined calc commands with compositions (Bug#36720) X-Git-Tag: emacs-27.0.90~1551^2~86 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a4c471c98474a249948793aad386e4efc64a1c96;p=emacs.git Fix saving user-defined calc commands with compositions (Bug#36720) * lisp/calc/calc-prog.el (calc-user-define-permanent): Correctly save the composition when the user specifies their formula by its command name or key. Copyright-paperwork-exempt: yes --- diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index ba8efd43b8e..37e10e8dfac 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -1097,7 +1097,7 @@ Redefine the corresponding command." (or func (setq func (and cmd (symbolp cmd) (fboundp cmd) cmd))) (if (get func 'math-compose-forms) (let ((pt (point))) - (insert "(put '" (symbol-name cmd) + (insert "(put '" (symbol-name func) " 'math-compose-forms '" (prin1-to-string (get func 'math-compose-forms)) ")\n")