From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Removing unloaded functions from auto-mode-alist. Date: Sun, 24 Apr 2005 22:50:26 +0200 Message-ID: <85fyxfrjal.fsf@lola.goethe.zz> References: <87zmvu6ba2.fsf@xs4all.nl> <85ll7e68ei.fsf@lola.goethe.zz> <854qe2ihhi.fsf@lola.goethe.zz> <85oecagzwf.fsf@lola.goethe.zz> <874qdvc48k.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114375833 12332 80.91.229.2 (24 Apr 2005 20:50:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 24 Apr 2005 20:50:33 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 24 22:50:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DPo2y-00066M-Nt for ged-emacs-devel@m.gmane.org; Sun, 24 Apr 2005 22:49:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DPo8L-000250-Sx for ged-emacs-devel@m.gmane.org; Sun, 24 Apr 2005 16:55:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DPo89-00024L-Vx for emacs-devel@gnu.org; Sun, 24 Apr 2005 16:55:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DPo88-00023k-PP for emacs-devel@gnu.org; Sun, 24 Apr 2005 16:55:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DPo86-0001uL-W7 for emacs-devel@gnu.org; Sun, 24 Apr 2005 16:55:04 -0400 Original-Received: from [151.189.21.42] (helo=mail-in-02.arcor-online.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DPo7B-00042C-20 for emacs-devel@gnu.org; Sun, 24 Apr 2005 16:54:05 -0400 Original-Received: from lola.goethe.zz (i53879025.versanet.de [83.135.144.37]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id 717CF138326; Sun, 24 Apr 2005 22:50:41 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 46E7C1C1E222; Sun, 24 Apr 2005 22:50:26 +0200 (CEST) Original-To: Lute Kamstra In-Reply-To: <874qdvc48k.fsf@xs4all.nl> (Lute Kamstra's message of "Sun, 24 Apr 2005 22:24:43 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36340 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36340 Lute Kamstra writes: > Consider the following situation: > > function 'a is autoloaded: (autoload "blabla" ...). > function 'b is autoloaded: (autoload "other" ...). > function 'c is defined. > function 'd is unbound. > > "blabla" defines 'a, 'b, 'c, and 'd as functions. > > Do (require 'blabla) and then (unload-feature 'blabla). > > Currently, all four functions will be unbound by unload-feature. You > propose to let unload-feature restore both 'a and 'b to their previous > autoloads [1]. Sure. > But what should be done with 'c? > > I think restoring 'c to its previous definition would be the right > thing to do. Not at all. The purpose of unload-feature is to be able to restore a state, most particular to conserve memory. So unload-feature should not waste memory by keeping in effect a history of load sequences around. Its purpose should be confined to unloading those features that _can_ reasonably be unloaded. And that means no functions whatsoever that _redefine_ stuff. The main purpose of the autoload restoration is to restore autoloads into the package itself, not foreign autoloads. I think that unload-feature should in the case of c being redefined simply barf and refuse to unload the feature. > But that would be quite a substantial change. It's probably best to > leave this alone until after the release. Lute, _any_ change in that area is best left alone. Richard has already clearly stated that we are not going to fiddle with it before the release, and I can only agree. The current state of brokenness has been there for a long time, and nobody really complained. We can't hope to get a serious amount of testing for this sort of stuff in before the release. And the effects might be memory leakage and similar hard to find things that take people months to figure out. We can't invest the time to make sure that nothing like this will happen. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum