From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24923: 25.1; Lisp watchpoints Date: Sun, 13 Nov 2016 17:29:54 +0200 Message-ID: <83fumvcs99.fsf@gnu.org> References: <87vavun235.fsf@users.sourceforge.net> <83eg2ie3lp.fsf@gnu.org> <87pom1mi3q.fsf@users.sourceforge.net> <83r36hcghy.fsf@gnu.org> <87fumwmc7q.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1479051038 20864 195.159.176.226 (13 Nov 2016 15:30:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 13 Nov 2016 15:30:38 +0000 (UTC) Cc: 24923@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 13 16:30:32 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c5wjX-0001rV-1A for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Nov 2016 16:30:15 +0100 Original-Received: from localhost ([::1]:34107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c5wjV-0000Uy-7o for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Nov 2016 10:30:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c5wjO-0000TR-I1 for bug-gnu-emacs@gnu.org; Sun, 13 Nov 2016 10:30:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c5wjL-0005jg-Eb for bug-gnu-emacs@gnu.org; Sun, 13 Nov 2016 10:30:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c5wjL-0005ja-B8 for bug-gnu-emacs@gnu.org; Sun, 13 Nov 2016 10:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c5wjL-0005BQ-2O for bug-gnu-emacs@gnu.org; Sun, 13 Nov 2016 10:30:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Nov 2016 15:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24923 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24923-submit@debbugs.gnu.org id=B24923.147905099519885 (code B ref 24923); Sun, 13 Nov 2016 15:30:02 +0000 Original-Received: (at 24923) by debbugs.gnu.org; 13 Nov 2016 15:29:55 +0000 Original-Received: from localhost ([127.0.0.1]:55989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c5wjD-0005Af-3l for submit@debbugs.gnu.org; Sun, 13 Nov 2016 10:29:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c5wjB-0005AN-Bf for 24923@debbugs.gnu.org; Sun, 13 Nov 2016 10:29:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c5wj3-0005fj-2j for 24923@debbugs.gnu.org; Sun, 13 Nov 2016 10:29:48 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c5wj2-0005ff-Vc; Sun, 13 Nov 2016 10:29:45 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4834 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c5wj2-0001BH-AG; Sun, 13 Nov 2016 10:29:44 -0500 In-reply-to: <87fumwmc7q.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125658 Archived-At: > 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.