diff lisp/window-xemacs.el @ 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 c5f86842283a
children 627e25731054
line wrap: on
line diff
--- 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."