changeset 60879:61f186efc434

(calc-embedded-mode-change): Save all relevant mode settings in calc-embedded-original-modes when modes are permanently changed.
author Jay Belanger <jay.p.belanger@gmail.com>
date Thu, 24 Mar 2005 13:34:53 +0000
parents 5af3391c371c
children 78ef32e30574
files lisp/calc/calc-embed.el
diffstat 1 files changed, 2 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-embed.el	Thu Mar 24 13:33:45 2005 +0000
+++ b/lisp/calc/calc-embed.el	Thu Mar 24 13:34:53 2005 +0000
@@ -1257,26 +1257,8 @@
 		       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)