emacs-devel
[Top][All Lists]
Advanced

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

Re: Possible defvar bug


From: Tassilo Horn
Subject: Re: Possible defvar bug
Date: Wed, 20 Feb 2013 09:09:02 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Another option is to change defvar so that it changes the specpdl
> entry when the var is let-bound (i.e. so that the default is set when
> we leave the let, as if it had been set before).

That would be fine with me if it would apply not only to `defvar' but
also to `defcustom'.

The reason for the problematic code in AUCTeX was that the loading of
crm should be deferred up to the point when it's actually used, e.g.,
when just viewing some LaTeX file there's no need to have crm loaded.
Thus, it was required only in some lower-level completion function
that's actually using it, but some of its higher-level (indirect)
callers let-bound crm-separator as they needed.

The alternative is to require crm at any caller binding `crm-separator',
or to eagerly require it top-level.  I do the latter now, and with crm
which is rather small and doesn't require anything else, that's no big
deal, but there are probably other packages where let-binding a variable
makes sense and requiring the package triggers a cascading load of other
packages.

Bye,
Tassilo



reply via email to

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