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
This commit is contained in:
Jack Coughlin 2019-07-18 08:16:50 -07:00 committed by Noam Postavsky
parent cbb8a8ad97
commit a4c471c984

View 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")