changeset 2227:8e7b4a0c1a81

[xemacs-hg @ 2004-08-21 17:05:49 by michaels] 2004-08-15 Jan Rychter <jwr@xemacs.org> * window-xemacs.el (really-set-window-configuration): deal gracefully with the case when the buffer previously saved in the configuration (and that we want to switch to) has been killed. Switch to the next buffer on the buffer-list in that case.
author michaels
date Sat, 21 Aug 2004 17:05:51 +0000
parents 9806495ffea0
children d6cbb56be2d6
files lisp/ChangeLog lisp/window-xemacs.el
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Aug 20 21:50:22 2004 +0000
+++ b/lisp/ChangeLog	Sat Aug 21 17:05:51 2004 +0000
@@ -1,3 +1,10 @@
+2004-08-15  Jan Rychter <jwr@xemacs.org>
+
+	* window-xemacs.el (really-set-window-configuration): deal
+	gracefully with the case when the buffer previously saved in the
+	configuration (and that we want to switch to) has been
+	killed. Switch to the next buffer on the buffer-list in that case.
+
 2004-08-13  Jerry James  <james@xemacs.org>
 
 	* bytecomp.el (forward-word): Tell the byte compiler the correct
--- a/lisp/window-xemacs.el	Fri Aug 20 21:50:22 2004 +0000
+++ b/lisp/window-xemacs.el	Sat Aug 21 17:05:51 2004 +0000
@@ -309,7 +309,10 @@
   (setq window-min-width (window-configuration-min-width configuration))
   (setq window-min-height (window-configuration-min-height configuration))
 
-  (set-buffer (window-configuration-current-buffer configuration)))
+  (let ((buffer (window-configuration-current-buffer configuration)))
+    (if (buffer-live-p buffer)
+	(set-buffer buffer)
+	(set-buffer (car (buffer-list))))))
 
 (defun set-window-configuration-frame-size (configuration)
   "Restore the frame size of a window configuration."