From xemacs-m  Sat Aug  2 02:20:05 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id CAA08511
	for <xemacs-beta@xemacs.org>; Sat, 2 Aug 1997 02:20:05 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.6/8.8.6) id AAA27132;
	Sat, 2 Aug 1997 00:24:26 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: [patch] to list active processes when exiting
References: <lbafj12kmr.fsf@orion.kurims.kyoto-u.ac.jp>
X-Face: `'%\i;ySOu]g?NlziJSk_$&@]KP`}~PEQPjZ5;nxSaDW_o$4+4%Ab]%Ifw3ZR;7TIT3,O,'
 @2{L;]ox6kc;$_5kU'n**9vFg-]eV~GbxSVCx|(s%uR[],*:^WKmC`B}(;|k9/m]gwt?&`t;^rfCJg
 khHH>pP1W\)xM0U@!FNDD72{3fDP$PkBhx^7Z?-WxH6DbFN:QOnT`llzW}VGdYv;n9lzljQvKTIBhQ
 YuV
X-Attribution: sb
From: SL Baur <steve@xemacs.org>
In-Reply-To: Jens-Ulrik Holger Petersen's message of "02 Aug 1997 14:56:28 +0900"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 02 Aug 1997 00:24:25 -0700
Message-ID: <m2g1st9hee.fsf@altair.xemacs.org>
Lines: 38
X-Mailer: Gnus v5.4.64/XEmacs 20.3(beta17) - "Bucharest"

Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp> writes:

> 1997-08-02  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
> 	* prim/files.el (save-buffers-kill-emacs):
> 	If there are active processes, then list them before querying if
> 	it is ok to exit emacs.

This is a great suggestion, but there are two problems with the patch.
`list-processes' doesn't guarantee much about which window it will
choose to show the process list in and if you type `no' at the prompt 
the previous window configuration is munged.

How about this instead?

Index: lisp/prim/files.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/prim/files.el,v
retrieving revision 1.23
diff -u -r1.23 files.el
--- files.el	1997/08/01 03:28:03	1.23
+++ files.el	1997/08/02 06:39:13
@@ -3024,8 +3024,14 @@
 		      val)
 		    (setq active t))
 	       (setq processes (cdr processes)))
-	     (or (not active)
-		 (yes-or-no-p "Active processes exist; kill them and exit anyway? "))))
+	     (or
+	      (not active)
+	      (save-excursion
+		(save-window-excursion
+		  (delete-other-windows)
+		  (list-processes)
+		  (yes-or-no-p
+		   "Active processes exist; kill them and exit anyway? "))))))
        ;; Query the user for other things, perhaps.
        (run-hook-with-args-until-failure 'kill-emacs-query-functions)
        (kill-emacs)))

