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

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

bug#3467: 23.0.94; let + make-local-variable => let value made global


From: Stefan Monnier
Subject: bug#3467: 23.0.94; let + make-local-variable => let value made global
Date: Fri, 05 Jun 2009 10:36:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

> If you eval these lines
>   (defvar w14 "global")
>   (defvar w15 "global")
>   (let ((w14 "let")
>         (w15 "let"))
>     (set (make-local-variable 'w14) "local")
>     (message "w14 maybe let: in buffer=%S, global=%S" w14 (default-value 
> 'w14))
>     (message "w15 maybe let: in buffer=%S, global=%S" w15 (default-value 
> 'w15)))
>   (message "w14 top level: in buffer=%S, global=%S" w14 (default-value 'w14))
>   (message "w15 top level: in buffer=%S, global=%S" w15 (default-value 'w15))

> the output will be

>   w14 maybe let: in buffer="local", global="let"
>   w15 maybe let: in buffer="let", global="let"
>   w14 top level: in buffer="global", global="let"
>   w15 top level: in buffer="global", global="global"

> All values here except w14 global value on next last line are arguably
> correct. The last value of w14 should be "global", not "let".

> It looks like perhaps the call to (make-local-variable w14) does not
> mark the "global let" value of w14 as let bound (or removes that
> mark).

Given the way let-binding and buffer-local bindings are currently
implemented, it's difficult to make it work correctly in all corner
cases, and even more so without slowing down the common case.
So don't hold your breath.


        Stefan





reply via email to

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