unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: npostavs@users.sourceforge.net
Cc: 24923@debbugs.gnu.org
Subject: bug#24923: 25.1; Lisp watchpoints
Date: Sun, 13 Nov 2016 17:29:54 +0200	[thread overview]
Message-ID: <83fumvcs99.fsf@gnu.org> (raw)
In-Reply-To: <87fumwmc7q.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net)

> From: npostavs@users.sourceforge.net
> Cc: 24923@debbugs.gnu.org
> Date: Sat, 12 Nov 2016 19:54:01 -0500
> 
> Here is the updated patch, created with -b.  I went with a call to
> `error'.  And actually, I had missed a couple of watchpoint types.

This LGTM, just one comment for when you actually push:

> +  else if (sym->redirect == SYMBOL_LOCALIZED &&
> +           SYMBOL_BLV (sym)->frame_local)

Our coding conventions put the logical operators at the beginning of a
line, not at EOL.

> +static void
> +harmonize_variable_watchers (Lisp_Object alias, Lisp_Object base_variable)
> +{
> +  if (!EQ (base_variable, alias) &&
> +      EQ (base_variable, Findirect_variable (alias)))

Same here.

> +  if (NILP (where) &&
> +      !EQ (operation, Qset_default) && !EQ (operation, Qmakunbound) &&
> +      !NILP (Flocal_variable_if_set_p (symbol, Fcurrent_buffer ())))

And here.

> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -626,6 +626,10 @@ two objects are 'eq' ('eql'), then the result of 'sxhash-eq'
>  consistency with the new functions.  For compatibility, 'sxhash'
>  remains as an alias to 'sxhash-equal'.
>  
> +** 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-watch'.
                     ^^^^^^^^^^^
This should follow the renaming.

(Hopefully, this will be followed by a suitable Edebug binding.)

> For the manual, do you think I should document just the debugging
> commands, or should there additionally be a section in the "Variables"
> chapter about the watchpoint mechanism?

Both, I think.

Thanks, I think this is a very important new feature.





  reply	other threads:[~2016-11-13 15:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11  3:10 bug#24923: 25.1; Lisp watchpoints npostavs
2016-11-11 10:02 ` Eli Zaretskii
2016-11-12  4:34   ` npostavs
2016-11-12  7:19     ` Eli Zaretskii
2016-11-13  0:54       ` npostavs
2016-11-13 15:29         ` Eli Zaretskii [this message]
2016-11-20  2:12           ` npostavs
2016-11-20 10:49             ` Stephen Berman
2016-11-20 14:14               ` npostavs
2016-11-20 16:11                 ` Eli Zaretskii
2016-11-20 19:26                   ` npostavs
2016-11-20 19:36                     ` Eli Zaretskii
2016-11-20 20:16                       ` npostavs
2016-11-21 17:31                         ` Eli Zaretskii
2016-12-03  1:47                           ` npostavs
2016-12-03  3:49                             ` Clément Pit--Claudel
2016-12-03  3:50                             ` Clément Pit--Claudel
2016-12-03  5:01                               ` Daniel Colascione
2016-12-03 14:11                                 ` npostavs
2016-11-20 15:58             ` Eli Zaretskii
2016-11-20 17:00               ` npostavs
2016-11-20 17:25                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fumvcs99.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24923@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).