changeset 10218:b78b8c445f33

(server-switch-buffer): Cope with dead frames and windows.
author Richard M. Stallman <rms@gnu.org>
date Fri, 23 Dec 1994 03:30:53 +0000
parents d112e49af18b
children d97313bb6f39
files lisp/server.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/server.el	Thu Dec 22 23:22:32 1994 +0000
+++ b/lisp/server.el	Fri Dec 23 03:30:53 1994 +0000
@@ -342,9 +342,12 @@
 (defun server-switch-buffer (next-buffer)
   "Switch to another buffer, preferably one that has a client.
 Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it."
-  (cond ((windowp server-window)
+  (cond ((and (windowp server-window)
+	      (window-live-p server-window))
 	 (select-window server-window))
 	((framep server-window)
+	 (if (not (frame-live-p server-window))
+	     (setq server-window (make-frame)))
 	 (select-window (frame-selected-window server-window))))
   (if (window-minibuffer-p (selected-window))
       (select-window (next-window nil 'nomini 0)))