From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: How to debug modification to a variable value? Date: Tue, 26 Jan 2010 16:02:05 -0500 Message-ID: References: <87636pvrdj.fsf@thinkpad.tsdh.de> <9131EBDDBDBF4BC384201871CA79A2BE@us.oracle.com> <87d40x5m9b.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264539755 13655 80.91.229.12 (26 Jan 2010 21:02:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Jan 2010 21:02:35 +0000 (UTC) Cc: drew.adams@oracle.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 26 22:02:27 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NZsYG-0008EX-FK for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2010 22:02:20 +0100 Original-Received: from localhost ([127.0.0.1]:57655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZsYH-0006SX-IX for ged-emacs-devel@m.gmane.org; Tue, 26 Jan 2010 16:02:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZsYC-0006SG-66 for emacs-devel@gnu.org; Tue, 26 Jan 2010 16:02:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZsY5-0006RI-T9 for emacs-devel@gnu.org; Tue, 26 Jan 2010 16:02:14 -0500 Original-Received: from [199.232.76.173] (port=35619 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZsY5-0006RE-NE for emacs-devel@gnu.org; Tue, 26 Jan 2010 16:02:09 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:50383) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZsY4-0002zc-0S; Tue, 26 Jan 2010 16:02:08 -0500 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o0QL25Jo023172; Tue, 26 Jan 2010 16:02:06 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id DCDFF3A797; Tue, 26 Jan 2010 16:02:05 -0500 (EST) In-Reply-To: (Richard Stallman's message of "Tue, 26 Jan 2010 11:49:38 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3456=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120465 Archived-At: > It wouldn't be terribly hard to add one, I think. > It would be very bad to use this hook for anything bug debugging, > since it means that setting a variable could do anything whatsoever. > So if such a featur one is added, it will be very important to make > sure it isn't used except for debugging. > One way is to design the feature so it always calls the debugger > when activated. For instance, if a certain flag is set in a symbol, > then setting its value or function slot calls the debugger. I was thinking of a variant of read-only, so `setq' (and `let') would signal an error (and hence throw you in the debugger). Stefan