emacs-devel
[Top][All Lists]
Advanced

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

Re: Watchpoints for emacs lisp.


From: Ken Raeburn
Subject: Re: Watchpoints for emacs lisp.
Date: Tue, 11 May 2010 09:43:21 -0400

On May 11, 2010, at 08:54, alin.s wrote:
> I think to do it so:
> 
> I insert to the struct Lisp_Symbol a field :watched: .

So, no support for watching for an element of an array or pair to be changed, 
or part of a string?

> I write a function whose input it a string S. This function looks for the
> given symbol in the corresponding obarray (global and local environment).
> When it finds the symbol whose name is S , it sets the flag :watched: to
> true.
> 
> Afterwards, in ALL functions that are able to change the value of a symbol,
> I insert a checkpoint, which looks like that:
> 
> <if the symbol to change has the flag :watched: true, that call the
> corresponding procedure of the debugger>
> 
> Is it ok the algorithm ? In how many obarrays should I look for the given
> symbol ?

If you do it this way, I think having a Lisp function take a symbol in which to 
set the flag, and having a user-callable function which uses (interactive "S") 
(which asks the user for a symbol name in the main obarray), is probably a good 
start.  Anything that isn't in the main obarray can be provided directly in 
lisp by the developer.

What about changes to the property list, or function value, of a symbol?

Ken


reply via email to

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