emacs-devel
[Top][All Lists]
Advanced

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

Lisp watchpoints (Was: [Emacs-diffs] master 19e09cf: Ensure redisplay af


From: Noam Postavsky
Subject: Lisp watchpoints (Was: [Emacs-diffs] master 19e09cf: Ensure redisplay after evaluation)
Date: Sat, 14 Nov 2015 13:14:15 -0500

On Fri, Nov 13, 2015 at 8:58 AM, Stefan Monnier
<address@hidden> wrote:
> Actually, I think it's not that complicated:
> - Look at the definition of SYMBOL_CONSTANT_P.

There is a comment on Lisp_Symbol's `constant' field saying "If the
value is 3, then the var can be changed, but only by `defconst'".
However, I can't find any code that uses this value. Is it safe to
ignore?

> - 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".

Would it be sensible to implement "readonly" as "hooked" + some hook
that signals error on write?

> 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.

To do that we'd have to trap reads as well as writes, right? Which
could be useful for debugging too.



reply via email to

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