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: Wed, 20 Apr 2005 01:24:55 +0200 Message-ID: <85k6mygxiw.fsf@lola.goethe.zz> References: <87zmvu6ba2.fsf@xs4all.nl> <85ll7e68ei.fsf@lola.goethe.zz> <854qe2ihhi.fsf@lola.goethe.zz> <8764yi4awh.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 1114020863 22282 80.91.229.2 (20 Apr 2005 18:14:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Apr 2005 18:14:23 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 20 20:14:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DOJhl-0004IF-TJ for ged-emacs-devel@m.gmane.org; Wed, 20 Apr 2005 20:13:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOJmK-0005op-Ak for ged-emacs-devel@m.gmane.org; Wed, 20 Apr 2005 14:18:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DOJli-0005YQ-EC for emacs-devel@gnu.org; Wed, 20 Apr 2005 14:17:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DOJlg-0005XW-GF for emacs-devel@gnu.org; Wed, 20 Apr 2005 14:17:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOJlg-0004k2-7t for emacs-devel@gnu.org; Wed, 20 Apr 2005 14:17:44 -0400 Original-Received: from [151.189.21.47] (helo=mail-in-07.arcor-online.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DOJkP-0006zH-QE for emacs-devel@gnu.org; Wed, 20 Apr 2005 14:16:26 -0400 Original-Received: from lola.goethe.zz (i53879BBD.versanet.de [83.135.155.189]) by mail-in-07.arcor-online.net (Postfix) with ESMTP id 9B245125ED3; Wed, 20 Apr 2005 20:13:59 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id C25141C1AB79; Wed, 20 Apr 2005 01:24:56 +0200 (CEST) Original-To: Lute Kamstra In-Reply-To: <8764yi4awh.fsf@xs4all.nl> (Lute Kamstra's message of "Wed, 20 Apr 2005 01:14:22 +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:36180 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36180 Lute Kamstra writes: > Stefan Monnier writes: > > [...] > >>> Won't work. Autoloads corresponding to a different file than the >>> loaded one don't get restored. >> >> That's a bug which we should fix. > > unload-feature restores the (autoload ...) form that is present in > the autoload property of the symbol. As I understand it, that > autoload property only gets set by do_autoload. Ah, that sounds like a more plausible explanation for the effect I see. That would mean that (require 'feature) can't be undone with (unload-feature 'feature) concerning the autoloads. And also all hook variables are cleared. This behavior has some sort of usefulness, namely "get rid of that package and I don't want to ever see it again", but I think the normal use pattern without extra options for unload-feature would probably to restore the stuff to dormant, not dead. > do_autoload is called when an autoloaded function is first called by > the lisp interpreter. (do_autoload also loads the file that defines > that function.) So if something other than do_autoload loads a file > that defines a function that had an autoload definition before, that > old autoload definition won't be recorded. > > Maybe we can shift recording the old autoload definition from > do_autoload to Fload? > >> In the mean time, you can use an auctex-override-unload-hook to >> re-install the autoloads. > > Don't you mean auctex-unload-hook? Probably. I assumed Stefan was talking about a different hook, but I can't see anything but the normal unload-hook, at least in loadhist.el. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum