bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18059: 24.3.92; defvar and special variables


From: Noam Postavsky
Subject: bug#18059: 24.3.92; defvar and special variables
Date: Wed, 14 Mar 2018 07:15:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Drew Adams <address@hidden> writes:

>> So does "end of the current lexical scope" make sense?  I think I've
>> been looking at this for too long, it's hard for me to tell by now.
>> 
>>     Likewise, you can tell the compiler that a variable is defined using
>>     @code{defvar} with no initial value.  (Note that this marks the
>>     variable as special, i.e.@: dynamically bound, but only until the end
>>     of the current lexical scope, or file if at top-level.)
>
>  ... but only _within_ the current lexical scope,
>  or within the current file if at top-level.
>
> Lexical scope is defined lexically.  It can have two
> limits or "ends", but it's best to avoid speaking of
> beginning and end, as that can suggest temporal end.

I phrased it that way to rule out the interpretation where the defvar
could affect statements occurring earlier in the file, though still
within the scope.  I guess there can be wrong interpretations for any
phrasing though...

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18059#15:

    In the case of a file, does it mean that the variable is considered
    special for the rest of the file, or for the whole file?






reply via email to

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