From: Jay Belanger Date: Thu, 24 Mar 2005 13:34:53 +0000 (+0000) Subject: (calc-embedded-mode-change): Save all relevant mode settings in X-Git-Tag: ttn-vms-21-2-B4~1579 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5e2b0a66e90341e31f3d7aa78ef429e4128e303b;p=emacs.git (calc-embedded-mode-change): Save all relevant mode settings in calc-embedded-original-modes when modes are permanently changed. --- diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 8a48b78e37e..2d2f66b1ebf 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -1257,26 +1257,8 @@ The command \\[yank] can retrieve it from there." calc-embedded-close-mode)))) (setq vars (cdr vars) values (cdr values)))))) - (when (and vars calc-embedded-original-modes (eq calc-mode-save-mode 'save)) - (cond ((equal vars '(the-language)) - (setcar calc-embedded-original-modes - (cons calc-language calc-language-option))) - ((equal vars '(the-display-just)) - (let* ((modes (cdr calc-embedded-original-modes)) - (just (assq 'calc-display-just modes)) - (origin (assq 'calc-display-origin modes))) - (if just - (setcdr just calc-display-just)) - (if origin - (setcdr origin calc-display-origin)))) - (t - (let ((modes (cdr calc-embedded-original-modes))) - (while vars - (let* ((var (car vars)) - (cell (assq var modes))) - (if cell - (setcdr cell (symbol-value var)))) - (setq vars (cdr vars))))))))) + (when (and vars (eq calc-mode-save-mode 'save)) + (calc-embedded-save-original-modes)))) (defun calc-embedded-var-change (var &optional buf) (if (symbolp var)