Commit a1c2400f authored by Jay Belanger's avatar Jay Belanger
Browse files

* calc/calc.el (calc-kill-stack-buffer): Make sure that the trail

  buffer isn't killed before making it current.
parent 8d009f4a
2011-06-02 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc.el (calc-kill-stack-buffer): Make sure that the trail
buffer isn't killed before making it current.
2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
Silence various byte-compiler warnings.
......
......@@ -1293,19 +1293,20 @@ the trail buffer."
(if (not info-list)
(progn
(setq calc-buffer-list (delete cb calc-buffer-list))
(with-current-buffer calc-trail-buffer
(if (eq cb calc-main-buffer)
;; If there are other Calc stacks, make another one
;; the calc-main-buffer ...
(if calc-buffer-list
(setq calc-main-buffer (car calc-buffer-list))
;; ... otherwise kill the trail and its windows.
(let ((wl (get-buffer-window-list calc-trail-buffer)))
(while wl
(delete-window (car wl))
(setq wl (cdr wl))))
(kill-buffer calc-trail-buffer)
(setq calc-trail-buffer nil))))
(if (buffer-live-p calc-trail-buffer)
(with-current-buffer calc-trail-buffer
(if (eq cb calc-main-buffer)
;; If there are other Calc stacks, make another one
;; the calc-main-buffer ...
(if calc-buffer-list
(setq calc-main-buffer (car calc-buffer-list))
;; ... otherwise kill the trail and its windows.
(let ((wl (get-buffer-window-list calc-trail-buffer)))
(while wl
(delete-window (car wl))
(setq wl (cdr wl))))
(kill-buffer calc-trail-buffer)))))
(setq calc-trail-buffer nil)
t))))
(defun calc-mode ()
......
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