emacs-devel
[Top][All Lists]
Advanced

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

Re: Lisp watchpoints


From: Noam Postavsky
Subject: Re: Lisp watchpoints
Date: Sun, 22 Nov 2015 15:13:47 -0500

Okay, I think I have something mostly working now. The first patch
adds watchpoints, then the following 2 implement lisp debug on
variable set, and ensure redisplay, respectively. The debugger part
isn't quite right, I'm seeing it trigger a 2nd time after continuing.

On Sat, Nov 14, 2015 at 5:29 PM, Stefan Monnier
<address@hidden> wrote:
> OTOH if we make sure that the "read-only" hook can't be
> overridden/changed/skipped by Elisp code, it might be fine.

After thinking about it, I think the simplest thing is not to
implement read-only with watchpoints, but rather keep it as a separate
Lisp_Symbol setting.

> - The risk involved in running arbitrary Lisp code for a variable-read
>   seems higher.

We could make `add-variable-watcher' callable only from C, and
manipulate some internal hash table instead of the symbol's plist. Of
course this would make it less flexible, but it avoids the whole
problem of running arbitrary Lisp code for variable-write (and read,
though I don't plan to implement read watchpoints for now).

Attachment: 0001-Add-lisp-watchpoints.patch
Description: Text Data

Attachment: 0002-Add-function-to-trigger-debugger-on-variable-write.patch
Description: Text Data

Attachment: 0003-Ensure-redisplay-using-variable-watchers.patch
Description: Text Data


reply via email to

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