Commit 5e2b0a66 authored by Jay Belanger's avatar Jay Belanger
Browse files

(calc-embedded-mode-change): Save all relevant mode settings in

calc-embedded-original-modes when modes are permanently changed.
parent 35626cba
......@@ -1257,26 +1257,8 @@ The command \\[yank] can retrieve it from there."
(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))))
(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))
(defun calc-embedded-var-change (var &optional buf)
(if (symbolp var)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment