# HG changeset patch # User Jay Belanger # Date 1240709799 0 # Node ID be74cb571117b601ed82658f812c701fe540c5b3 # Parent 056e34bacfbc9344036933d4216a9ef06196b713 (calc-set-mode-line): Check to make sure that the correct Calc buffer gets "Embed" in the mode line. (calc-mode): Copy stack list for additional Calc buffers. diff -r 056e34bacfbc -r be74cb571117 lisp/calc/calc.el --- a/lisp/calc/calc.el Sat Apr 25 21:13:35 2009 +0000 +++ b/lisp/calc/calc.el Sun Apr 26 01:36:39 2009 +0000 @@ -1335,6 +1335,7 @@ (calc-refresh t) (calc-set-mode-line) (calc-check-defines) + (if calc-buffer-list (setq calc-stack (copy-list calc-stack))) (add-to-list 'calc-buffer-list (current-buffer) t)) (defvar calc-check-defines 'calc-check-defines) ; suitable for run-hooks @@ -1657,7 +1658,9 @@ (figs (nth 1 calc-float-format)) (new-mode-string (format "Calc%s%s: %d %s %-14s" - (if calc-embedded-info "Embed" "") + (if (and calc-embedded-info + (eq (aref calc-embedded-info 1) (current-buffer))) + "Embed" "") (if (and (> (length (buffer-name)) 12) (equal (substring (buffer-name) 0 12) "*Calculator*"))