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: Fri, 22 Apr 2005 22:51:40 +0200 Message-ID: <857jiucz6r.fsf@lola.goethe.zz> References: <87zmvu6ba2.fsf@xs4all.nl> <85ll7e68ei.fsf@lola.goethe.zz> <854qe2ihhi.fsf@lola.goethe.zz> <8764yi4awh.fsf@xs4all.nl> <873btlsalu.fsf@xs4all.nl> <87pswo84vv.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 1114202978 21841 80.91.229.2 (22 Apr 2005 20:49:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Apr 2005 20:49:38 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 22 22:49:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DP54y-0004h9-0p for ged-emacs-devel@m.gmane.org; Fri, 22 Apr 2005 22:48:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DP59x-00067e-2f for ged-emacs-devel@m.gmane.org; Fri, 22 Apr 2005 16:53:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DP59p-00066s-5T for emacs-devel@gnu.org; Fri, 22 Apr 2005 16:53:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DP59n-00064A-M4 for emacs-devel@gnu.org; Fri, 22 Apr 2005 16:53:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DP59n-0005lh-3p for emacs-devel@gnu.org; Fri, 22 Apr 2005 16:53:47 -0400 Original-Received: from [151.189.21.49] (helo=mail-in-09.arcor-online.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DP5Aj-00009f-Kb; Fri, 22 Apr 2005 16:54:45 -0400 Original-Received: from lola.goethe.zz (i5387A23F.versanet.de [83.135.162.63]) by mail-in-09.arcor-online.net (Postfix) with ESMTP id D9C3059715; Fri, 22 Apr 2005 22:51:54 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id A9F511C1E222; Fri, 22 Apr 2005 22:51:40 +0200 (CEST) Original-To: Lute Kamstra In-Reply-To: <87pswo84vv.fsf@xs4all.nl> (Lute Kamstra's message of "Thu, 21 Apr 2005 18:35:16 +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:36274 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36274 Lute Kamstra writes: > Richard Stallman writes: > >> Is there a reason why Fload can't do like do_autoload and use the >> information recorded in Vautoload_queue to set the autoload property >> of function symbols? >> >> Maybe it could work. >> >> I think it would be better not to try changing this now. > > Agreed; changing this would be tricky. I'll put it on my post-release > todo list. ;-) I have thought about it somewhat. I have come to the opinion that it is a bad idea if load-file does this sort of recording since load-file is often used equivalently to eval-buffer and similar things. The function that _clearly_ should trigger/use the recorded information, however, is "require". I don't think we need to make (load "filename") (unload-feature 'filename) do anything sensible (and indeed it is legal to load the same file several times in succession), but it seems desirable to have (require 'filename) (unload-feature 'filename) form a proper pair. Unfortunately, this does not work well with the site-lisp.el construct (mapc 'load-file (directory-files "site-start.d" t ".el\\'")) So a better expedient would be to have (provide 'xxx) turn on the necessary action at the end of the current load file in case that the feature is provided the first time. This should be a pretty reliable way to do the recordings for files that are connected with a "feature". -- David Kastrup, Kriemhildstr. 15, 44793 Bochum