unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Lisp watchpoints
@ 2016-12-03 14:51 Kaushal Modi
  0 siblings, 0 replies; 34+ messages in thread
From: Kaushal Modi @ 2016-12-03 14:51 UTC (permalink / raw)
  To: Noam Postavsky, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

Hi Noam,

This is awesome! Thanks! I will be trying this new feature out soon!

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=88fefc3291060f18503738aaa4e81b98f1970a55

+++
+** New function `add-variable-watcher' can be used to call a function
+when a symbol's value is changed.  This is used to implement the new
+debugger command `debug-on-variable-change'.
+
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 743 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Lisp watchpoints (Was: [Emacs-diffs] master 19e09cf: Ensure redisplay after evaluation)
@ 2015-11-14 18:14 Noam Postavsky
  2015-11-14 22:29 ` Lisp watchpoints Stefan Monnier
  0 siblings, 1 reply; 34+ messages in thread
From: Noam Postavsky @ 2015-11-14 18:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: John Wiegley, Eli Zaretskii, emacs-devel

On Fri, Nov 13, 2015 at 8:58 AM, Stefan Monnier
<monnier@iro.umontreal.ca> 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.



^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2016-12-03 14:51 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-03 14:51 Lisp watchpoints Kaushal Modi
  -- strict thread matches above, loose matches on Subject: below --
2015-11-14 18:14 Lisp watchpoints (Was: [Emacs-diffs] master 19e09cf: Ensure redisplay after evaluation) Noam Postavsky
2015-11-14 22:29 ` Lisp watchpoints Stefan Monnier
2015-11-22 20:13   ` Noam Postavsky
2015-11-22 20:41     ` Eli Zaretskii
2015-11-22 21:25       ` Stefan Monnier
2015-11-23  3:32         ` Eli Zaretskii
2015-11-23  2:31       ` Noam Postavsky
2015-11-29  2:04       ` Noam Postavsky
2015-11-29  4:44         ` Stefan Monnier
2015-11-29  5:12           ` Noam Postavsky
2015-11-29 11:28             ` Andreas Schwab
2015-11-29 14:12               ` Noam Postavsky
2015-11-29 15:37                 ` Stefan Monnier
2015-11-29 16:10                 ` Eli Zaretskii
2015-11-30  0:57                   ` Noam Postavsky
2015-11-30  1:14                     ` Stefan Monnier
2015-11-30 15:49                     ` Eli Zaretskii
2015-11-29 11:28           ` Andreas Schwab
2015-11-29 15:39             ` Stefan Monnier
2015-11-29 15:45           ` Eli Zaretskii
2015-11-29 16:01             ` Noam Postavsky
2015-11-29 16:04               ` Noam Postavsky
2015-11-29 17:13                 ` Eli Zaretskii
2015-11-29 22:24                 ` Stefan Monnier
2015-11-29 17:11               ` Eli Zaretskii
2015-11-29 16:06             ` Stefan Monnier
2015-11-29 16:43         ` Eli Zaretskii
2015-11-29 19:40           ` Noam Postavsky
2015-11-29 19:54             ` Eli Zaretskii
2015-11-29 20:35               ` Noam Postavsky
2015-11-29 20:45                 ` Eli Zaretskii
2015-11-29 21:33                   ` Noam Postavsky
2015-11-29 20:00           ` Andreas Schwab
2015-11-29 20:19             ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).