]> git.eshelyaron.com Git - emacs.git/commitdiff
(calc-set-mode-line): Check to make sure that the correct Calc buffer
authorJay Belanger <jay.p.belanger@gmail.com>
Sun, 26 Apr 2009 01:39:48 +0000 (01:39 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Sun, 26 Apr 2009 01:39:48 +0000 (01:39 +0000)
gets "Embed" in the mode line.
(calc-mode): Copy stack list for additional Calc buffers.

lisp/ChangeLog
lisp/calc/calc.el

index e77abd01379be284e53a3af4c5670ae21186f124..646bb06fed2e160ba05477d3b510a01a70ebd557 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-26  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc.el (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.
+
 2009-04-25  Chong Yidong  <cyd@stupidchicken.com>
 
        * simple.el (line-move-visual): If point is stuck moving backwards
index e1496da8d626a3c8dbe21e1017469428ba137f7b..00a33f59374928379ead862ff1bf65c95cc3cf26 100644 (file)
@@ -1335,6 +1335,7 @@ Notations:  3.14e6     3.14 * 10^6
   (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 @@ See calc-keypad for details."
           (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*"))