emacs-devel
[Top][All Lists]
Advanced

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

Re: Finding a variable before it's loaded


From: Lennart Borgman
Subject: Re: Finding a variable before it's loaded
Date: Thu, 23 Feb 2012 23:29:57 +0100

On Thu, Feb 23, 2012 at 22:48, Stefan Monnier <address@hidden> wrote:
>>> The docstring of comment-style refers the user to comment-styles for
>>> details on what the values mean.  However, this is not available until
>>> after newcomment.el is loaded.  So autoload comment-styles to avoid
>>> this problem.
>> Then this is an instance of a general problem. See eg
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1768
>> for the same thing.
>> IMO there should be a general solution rather than papering over every
>> instance that occurs with more pre/autoloading.
>
> Yes, there is a general problem underneath, but it's difficult to
> solve satisfactorily.  IIRC someone did submit a potential solution at
> some point, but it required building a fairly large file listing where
> each var is defined.

I did that. Though I did not have time to finish it in the end.
However the timing was not a big problem. The table size was perhaps a
problem.

> I have toyed with a slightly different approach which tries to reduce
> the size of this file by keeping not the list of all vars, but only
> a list of prefixes used by each file.

Sounds like a better solution.

> This way, if I want to find `comment-styles', I can simply load all the files
> that define variables with the "comment-" prefix.

Could not that be problematic? Maybe the build process could warn if a
prefix is found in the wrong file?



reply via email to

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