diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calc/calc.el | 27 |
2 files changed, 19 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71d927e9692..92b125dd1b0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-06-02 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 2 | |||
| 3 | * calc/calc.el (calc-kill-stack-buffer): Make sure that the trail | ||
| 4 | buffer isn't killed before making it current. | ||
| 5 | |||
| 1 | 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | Silence various byte-compiler warnings. | 8 | Silence various byte-compiler warnings. |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 41f549cbe2c..55ac412b435 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -1293,19 +1293,20 @@ the trail buffer." | |||
| 1293 | (if (not info-list) | 1293 | (if (not info-list) |
| 1294 | (progn | 1294 | (progn |
| 1295 | (setq calc-buffer-list (delete cb calc-buffer-list)) | 1295 | (setq calc-buffer-list (delete cb calc-buffer-list)) |
| 1296 | (with-current-buffer calc-trail-buffer | 1296 | (if (buffer-live-p calc-trail-buffer) |
| 1297 | (if (eq cb calc-main-buffer) | 1297 | (with-current-buffer calc-trail-buffer |
| 1298 | ;; If there are other Calc stacks, make another one | 1298 | (if (eq cb calc-main-buffer) |
| 1299 | ;; the calc-main-buffer ... | 1299 | ;; If there are other Calc stacks, make another one |
| 1300 | (if calc-buffer-list | 1300 | ;; the calc-main-buffer ... |
| 1301 | (setq calc-main-buffer (car calc-buffer-list)) | 1301 | (if calc-buffer-list |
| 1302 | ;; ... otherwise kill the trail and its windows. | 1302 | (setq calc-main-buffer (car calc-buffer-list)) |
| 1303 | (let ((wl (get-buffer-window-list calc-trail-buffer))) | 1303 | ;; ... otherwise kill the trail and its windows. |
| 1304 | (while wl | 1304 | (let ((wl (get-buffer-window-list calc-trail-buffer))) |
| 1305 | (delete-window (car wl)) | 1305 | (while wl |
| 1306 | (setq wl (cdr wl)))) | 1306 | (delete-window (car wl)) |
| 1307 | (kill-buffer calc-trail-buffer) | 1307 | (setq wl (cdr wl)))) |
| 1308 | (setq calc-trail-buffer nil)))) | 1308 | (kill-buffer calc-trail-buffer))))) |
| 1309 | (setq calc-trail-buffer nil) | ||
| 1309 | t)))) | 1310 | t)))) |
| 1310 | 1311 | ||
| 1311 | (defun calc-mode () | 1312 | (defun calc-mode () |