* lisp/desktop.el (desktop-create-buffer): Check that buffers are still live

before burying them.

Fixes: debbugs:18373
This commit is contained in:
Ivan Shmakov 2014-09-09 20:47:20 -04:00 committed by Stefan Monnier
parent 7c2aaeb4f6
commit 2776a6502b
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2014-09-10 Ivan Shmakov <ivan@siamics.net> (tiny change)
* desktop.el (desktop-create-buffer): Check that buffers are still live
before burying them (bug#18373).
2014-09-09 Glenn Morris <rgm@gnu.org>
* calendar/diary-lib.el (diary-list-entries):

View file

@ -1375,7 +1375,9 @@ after that many seconds of idle time."
;; Restore buffer list order with new buffer at end. Don't change
;; the order for old desktop files (old desktop module behavior).
(unless (< desktop-file-version 206)
(mapc 'bury-buffer buffer-list)
(dolist (buf buffer-list)
(and (buffer-live-p buf)
(bury-buffer buf)))
(when result (bury-buffer result)))
(when result
(unless (or desktop-first-buffer (< desktop-file-version 206))