emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 19e09cf: Ensure redisplay after evaluation


From: Eli Zaretskii
Subject: Re: [Emacs-diffs] master 19e09cf: Ensure redisplay after evaluation
Date: Sun, 08 Nov 2015 18:12:19 +0200

> From: Stefan Monnier <address@hidden>
> Cc: Eli Zaretskii <address@hidden>
> Date: Sat, 07 Nov 2015 18:40:30 -0500
> 
> The write-barrier discussed in the past moved this check to within the
> SYMBOL_CONSTANT_P test.  More specifically, it turned the
> SYMBOL_CONSTANT_P boolean into a field with 3 different values,
> depending on whether a write can:
> - go through at full-speed
> - goes through a watcher function (or call it a "barrier")
> - is not allowed at all
> 
> This way, assignments to most variables is unaffected.

Thanks.  AFAIU, the patch posted in that discussion cannot be used due
to copyright reasons.  So Someoneā„¢ will have to reimplement the idea
from scratch.  I cannot do that: I understand the idea, but don't know
enough about the machinery that's involved in binding symbols to work
out the low-level details.  Would you like to do that?

Also, we have this strong objection to the idea from Richard:

> Hooks on setting variables is a fundamentally bad idea
> because it means that Lisp code which appears to just bind variables
> can call functions where you did not expect it.
> [...]
> However, having any variable, the binding of which can run Lisp code,
> is an absolute disaster.  If the price we pay for to avoid that disaster
> is that we don't have the feature you would like, so be it.
> 
>   > Besides that, hooks on setting variables would be useful for debugging.
> 
> No matter what they would be useful for, it is not worth the chaos
> they would cause.
> 
> Maybe a specialized feature solely for debugging could be made safe.

AFAICT, these objections were never addressed in the discussions.  And
we _are_ talking about using such a facility for purposes other than
debugging, albeit internal purposes.  Maybe calling a C function for
"hooked" symbols takes care of Richard's objections, but then such a
function will probably have to consult some Lisp data to know what to
do with each "hooked" symbol.  Not sure if this is okay or sufficient.




reply via email to

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