]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix saving user-defined calc commands with compositions (Bug#36720)
authorJack Coughlin <jack@jackc.me>
Thu, 18 Jul 2019 15:16:50 +0000 (08:16 -0700)
committerNoam Postavsky <npostavs@gmail.com>
Fri, 13 Sep 2019 00:25:30 +0000 (20:25 -0400)
* 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

lisp/calc/calc-prog.el

index ba8efd43b8ebc024fbac543ecc74e18c201e614a..37e10e8dfacc6e44b171be065ca685819f88c44a 100644 (file)
@@ -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")