emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing unloaded functions from auto-mode-alist.


From: Lute Kamstra
Subject: Re: Removing unloaded functions from auto-mode-alist.
Date: Sat, 23 Apr 2005 23:00:57 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> Lute Kamstra <address@hidden> writes:
>
>> Richard Stallman <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]