From xemacs-m  Thu Mar 27 19:54:43 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 TAA29173
	for <xemacs-beta@xemacs.org>; Thu, 27 Mar 1997 19:54:41 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id SAA18387;
	Thu, 27 Mar 1997 18:07:28 -0800
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: XEmacs crash (efs-related)
References: <199703271307.OAA03894@atusel63.alcatel.at> <rvwwqt6nt1.fsf@sdnp5.ucsd.edu> <m2d8slc87w.fsf@altair.xemacs.org> <rvvi6d6irv.fsf@sdnp5.ucsd.edu>
X-Url: http://www.miranova.com/%7Esteve/
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: David Moore's message of 27 Mar 1997 15:02:12 -0800
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
Date: 27 Mar 1997 18:07:27 -0800
Message-ID: <m2pvwk7ork.fsf@altair.xemacs.org>
Lines: 40
X-Mailer: Gnus v5.4.37/XEmacs 20.1(beta10)

> David Moore writes:

[ dired's installation of a file handler for "." ]

> As it is now, if you load dired to look at just one directory, 5 days
> later you'll still be paying quite large penalties to open local files
> (can we say NNML, boys and girls?  i knew you could).

Dired is supposed to uninstall its handler when all dired buffers are
gone.  It doesn't, here's a fix.  This probably ought to be considered 
an Official Patch for the 19.15 patch page.

Index: lisp/efs/dired.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/efs/dired.el,v
retrieving revision 1.4
diff -u -r1.4 dired.el
--- dired.el	1997/03/22 06:01:52	1.4
+++ dired.el	1997/03/28 01:48:17
@@ -5719,7 +5719,10 @@
 	       (function
 		(lambda (x)
 		  (and (not (eq (current-buffer) (cdr x))) x)))
-	       dired-buffers))))
+	       dired-buffers)))
+  ;; If there are no more dired buffers, we are no longer needed in the
+  ;; file-name-handler-alist.
+  (or dired-buffers (dired-remove-from-file-name-handler-alist)))
 
 (defun dired-fun-in-all-buffers (directory fun &rest args)
   ;; In all buffers dired'ing DIRECTORY, run FUN with ARGS.


> The file handlers are nifty things, but add real overhead when they get
> called.  You really don't want "." as a regexp for them. :)

O.K.  Somebody come up with something better.
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

