emacs-devel
[Top][All Lists]
Advanced

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

RE: Possible defvar bug


From: Drew Adams
Subject: RE: Possible defvar bug
Date: Mon, 18 Feb 2013 08:40:50 -0800

> >> See also documentation of `require' which should not be used inside
> >> `let' bindings for same reasons.
> >
> > Hm.  What doc of `require' mentions this?
> 
> ,---- 
> | (Note that it
> | is important that the `require' statement be outside the body of the
> | `let'.  Loading a library while its variables are let-bound can have
> | unintended consequences, namely the variables becoming unbound after
> | the let exits.)
> `----

Right, thanks - read right past that without noticing, somehow.

> > I hope that the doc for this, wherever it might be, is more specific
> > than what you said, because I cannot imagine that such a blanket
> > statement is correct.  Presumably, any potential problem would depend
> > on what variables the `let' binds?
> Of course.

And the passage is clear enough about that: "the `let'" and "its variables"
refer to a specific `let' that binds variables defined in the required file.
That's the point.

It's worth being careful about this - a general statement that "`require' should
not be used inside `let' bindings" is quite misleading.  You had me worried
there, for a moment.  Thanks for the doc reference.




reply via email to

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