From: Ivan Shmakov Date: Wed, 10 Sep 2014 00:47:20 +0000 (-0400) Subject: * lisp/desktop.el (desktop-create-buffer): Check that buffers are still live X-Git-Tag: emacs-24.3.94~43 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2776a6502b211c45e6b4e65549436d2d8527b6f3;p=emacs.git * lisp/desktop.el (desktop-create-buffer): Check that buffers are still live before burying them. Fixes: debbugs:18373 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7018d3c8abb..46cb4ba0d68 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-09-10 Ivan Shmakov (tiny change) + + * desktop.el (desktop-create-buffer): Check that buffers are still live + before burying them (bug#18373). + 2014-09-09 Glenn Morris * calendar/diary-lib.el (diary-list-entries): diff --git a/lisp/desktop.el b/lisp/desktop.el index 40e6b364e45..360ff48339b 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -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))