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: David Kastrup
Subject: Re: Removing unloaded functions from auto-mode-alist.
Date: Fri, 22 Apr 2005 22:51:40 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

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".

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




reply via email to

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