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: Stefan Monnier
Subject: Re: [Emacs-diffs] master 19e09cf: Ensure redisplay after evaluation
Date: Fri, 13 Nov 2015 08:58:55 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Alternatively, Someoneā„¢ could re-read the discussion and post the
> description of what the posted code did (without showing any actual
> code), then you could write the code using only that description,
> without looking at the actual code posted back then.  This is a better
> method, I think.  Are there any volunteers for the first part, of
> coming up with the description?  If no one steps forward, I could do
> this myself, but I think this is a good opportunity for someone to
> study a somewhat complicated issue related to how the Emacs Lisp
> interpreter works.

Actually, I think it's not that complicated:
- Look at the definition of SYMBOL_CONSTANT_P.
- Change its name to SYMBOL_SLOWWRITE_P.
- Change the field it tests from being a boolean to being a 3-valued
  thingy, with values "fullspeed", "hooked", and "readonly".
- Look at all users of that macro and update them accordingly.
- Add new primitives to set/unset/test the field (probably only
  allowing to change it from fullspeed to hooked and back).

You get to choose what "hooked" really means, of course.
For that, you should take into account the applications we have in mind:
- tickle the debugger.
- mark the mode-line for redisplay.
There could be others, of course.  Tho I'd expect most others would look
like the redisplay case, i.e. the hook function probably wouldn't do
much more than "mark somewhere that the assignment took place and keep
going".
Maybe it'd be nice to make sure that "defvaralias" could be
re-implemented on top of those hooks, even though I don't think such
a reimplementation is desirable at this point.


        Stefan



reply via email to

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