From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: Re: Removing unloaded functions from auto-mode-alist. Date: Sat, 23 Apr 2005 23:00:57 +0200 Message-ID: <87oec5p5rq.fsf@xs4all.nl> 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> <857jiucz6r.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114290238 31233 80.91.229.2 (23 Apr 2005 21:03:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 23 Apr 2005 21:03:58 +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 Sat Apr 23 23:03:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DPRmn-0000ot-TH for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2005 23:03:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DPRry-0005HS-MR for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2005 17:08:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DPRrr-0005HM-5Y for emacs-devel@gnu.org; Sat, 23 Apr 2005 17:08:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DPRrp-0005HA-Mq for emacs-devel@gnu.org; Sat, 23 Apr 2005 17:08:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DPRrp-0005H7-KE for emacs-devel@gnu.org; Sat, 23 Apr 2005 17:08:45 -0400 Original-Received: from [194.109.24.23] (helo=smtp-vbr3.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DPRnG-0005pr-1q; Sat, 23 Apr 2005 17:04:02 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr3.xs4all.nl (8.12.11/8.12.11) with ESMTP id j3NL0waC045522; Sat, 23 Apr 2005 23:00:58 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DPRkH-0003uc-00; Sat, 23 Apr 2005 23:00:57 +0200 Original-To: David Kastrup In-Reply-To: <857jiucz6r.fsf@lola.goethe.zz> (David Kastrup's message of "Fri, 22 Apr 2005 22:51:40 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 58 X-Virus-Scanned: by XS4ALL Virus Scanner 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:36309 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36309 David Kastrup writes: > 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". Agreed. > 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. I'm not sure if it's the best solution not to let (load "filename") record autoloads. But letting only (require 'filename) record autoloads would be a big improvement. My guess is that the vast majority of files get loaded by do_autoload and Frequire. Furthermore, it seems quite easy to implement the recording of autoloads in Frequire. I'll give it a try and experiment with it for a while... > 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". I'm not familiar with this. Could you elaborate? When is this used? Does it load files that define functions that replace autoloads? Lute.