[Top][All Lists]

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

Re: Possible defvar bug

From: Lawrence Mitchell
Subject: Re: Possible defvar bug
Date: Mon, 18 Feb 2013 16:29:02 +0000
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Drew Adams wrote:
>> See also documentation of `require' which should not be used inside
>> `let' bindings for same reasons.

> Hm.  What doc of `require' mentions this?  I looked at the doc string and
> (elisp) `Named Features', but I didn't notice anything about this.

It's in the discussion, rather than in the documentation of the
individual functions on that page but:

| (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.)

> 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?

Indeed.  I think that is what the paragraph is warning of.

Lawrence Mitchell <address@hidden>

reply via email to

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