emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] (Updated) Run hook when variable is set


From: Kelly Dean
Subject: Re: [PATCH] (Updated) Run hook when variable is set
Date: Thu, 19 Feb 2015 10:35:14 +0000

Stefan Monnier wrote:
> Where does the manual say such a thing?

Er, it seems it doesn't. ;-) It says ‟void”, not ‟unbound”. Except in just one 
place (17.2.7, (elisp) Trapping Errors) where it has ⌜unbound variable⌝ to mean 
void variable.

I was fooled by the void value being named Qunbound.

> AFAICT this absurd concept
> comes from your interpretation of what's going on, and just shows that
> your interpretation is not a good model.

Regardless of the name, the interpretation is the right one for multi-threaded 
code, and is just as valid as the alternative for single-threaded code.

>> Either way, the behavior of makunbound is wrong.
>
> You've said so enough times, but I haven't heard any concrete
> alternative proposal so far.

Oh, I thought that was clear. Have makunbound signal an error if 
let_shadows_global_binding_p or Flocal_variable_p is true. My theory is that 
this would only catch bugs, not catch intentional uses.

> Not that I'd advise you to spend time on
> it, since this is a complete non-problem as far as I'm concerned.

Understood.

> I see you decided to use a special (uninterned symbol) value instead.
> That's OK with me.

Ok, I'll have an updated and hopefully finalized patch shortly.

> This operator has 0 cost since any decent compiler will just swap the
> two branches of the `if' instead of performing an actual `not' computation.

Duh, oops.

Well, ⌜vetted⌝ works just as well as ⌜writable⌝ for the field name, so I'm 
inclined to leave it that way, but I'll change it if you want.



reply via email to

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