From xemacs-m  Mon Dec 30 11:51:24 1996
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with ESMTP
	  id LAA16328 for <xemacs-beta@xemacs.org>; Mon, 30 Dec 1996 11:51:23 -0600 (CST)
Received: (from steve@localhost)
          by altair.xemacs.org (8.8.4/8.8.4)
	  id KAA04521; Mon, 30 Dec 1996 10:01:54 -0800
Sender: steve@xemacs.org
To: xemacs-beta@xemacs.org
Subject: Re: gnuserv.el and killing the last window.
References: <199612172151.QAA67400@black-ice.cc.vt.edu>
X-Url: http://www.miranova.com/%7Esteve/
Mail-Copies-To: never
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Valdis.Kletnieks@vt.edu's message of Tue, 17 Dec 1996 16:51:26 -0500
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: text/plain; charset=US-ASCII
Date: 30 Dec 1996 10:01:53 -0800
Message-ID: <m2g20ndi7i.fsf@altair.xemacs.org>
Lines: 58
X-Mailer: Red Gnus v0.72/XEmacs 20.0

>>>>> "Valdis" == Valdis Kletnieks <Valdis.Kletnieks@vt.edu> writes:

Valdis> I *used* to be able to start xemacs -unmapped, and then use
Valdis> gnuclient to send off requests, and it would leave zero
Valdis> windows open if nothing was left being edited.  However,
Valdis> around 20.0-b26 or so, there was the return of the 'force'
Valdis> option to delete-frame.

Valdis> Does anybody see anything vastly wrong with the following
Valdis> patch to create a user-settable flag so they can select
Valdis> whether or not they want the last frame to be killable?

No, so I applied it to 19.15beta7 and 20.0beta34.  Thanks for the
patch.
Index: gnuserv.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/packages/gnuserv.el,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gnuserv.el
--- gnuserv.el	1996/12/18 22:42:52	1.1.1.1
+++ gnuserv.el	1996/12/30 17:38:09
@@ -84,6 +84,9 @@
 (defvar server-string ""
   "The last input string from the server")
 
+(defvar server-kill-last-frame nil
+  "set to t to kill last frame")
+
 (defvar current-client nil
   "The client we are currently talking to")
 
@@ -487,7 +490,9 @@
 When all of a client's buffers are marked as \"done\", the client is notified.
 
 If invoked with a prefix argument, or if there is no server process running, 
-starts server process and that is all.  Invoked by \\[server-edit]."
+starts server process and that is all.  Invoked by \\[server-edit].
+
+If `server-kill-last-frame' is t, then the final frame will be killed."
   (interactive "P")
   (if (or arg
 	  (not server-process)
@@ -500,7 +505,8 @@
 			       gnuserv-frame
 			       (frame-live-p gnuserv-frame))
 			  (condition-case ()
-			      (delete-frame (selected-frame) nil)
+			      (delete-frame (selected-frame)
+					    server-kill-last-frame)
 			    (error 
 			     (message "Not deleting last visible frame...")))))
 		     ((or (not window-system) 

-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.
"That Bill Clinton.  He probably doesn't know how to log on to the
Internet."  -- Rush Limbaugh, noted Computer Expert

