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: Lisp watchpoints Date: Sun, 29 Nov 2015 17:24:46 -0500 Message-ID: References: <83wpt922dn.fsf@gnu.org> <83si3ooll7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448835913 10064 80.91.229.3 (29 Nov 2015 22:25:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Nov 2015 22:25:13 +0000 (UTC) Cc: John Wiegley , Eli Zaretskii , emacs-devel@gnu.org To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 29 23:25:03 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a3AP0-0002Ca-Kr for ged-emacs-devel@m.gmane.org; Sun, 29 Nov 2015 23:25:02 +0100 Original-Received: from localhost ([::1]:38008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3AP4-0005tq-NM for ged-emacs-devel@m.gmane.org; Sun, 29 Nov 2015 17:25:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3AOr-0005tc-6R for emacs-devel@gnu.org; Sun, 29 Nov 2015 17:24:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3AOq-0002Kv-5J for emacs-devel@gnu.org; Sun, 29 Nov 2015 17:24:53 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:25853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3AOm-0002JO-CE; Sun, 29 Nov 2015 17:24:48 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsEwA731xV/yr292hcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQcBAQEBHos6hQUHhC0FjDCoVCOEFiCCeAEBAQ X-IPAS-Result: A0AsEwA731xV/yr292hcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQcBAQEBHos6hQUHhC0FjDCoVCOEFiCCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="179711149" Original-Received: from 104-247-246-42.cpe.teksavvy.com (HELO fmsmemgm.homelinux.net) ([104.247.246.42]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Nov 2015 17:24:47 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id D75B3AE07A; Sun, 29 Nov 2015 17:24:46 -0500 (EST) In-Reply-To: (Noam Postavsky's message of "Sun, 29 Nov 2015 11:04:23 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195581 Archived-At: >> The let-binding is currently trapped, but not the corresponding >> unbinding. Is it better to skip both? As far as I can tell, it's not >> feasible to trap the unbinding. The unbinding currently doesn't check CONSTANT_P, but that's just an optimization that becomes invalid for trapped variables. I don't see why we couldn't trap the unbinding just like we trap the binding (at the cost of an extra check of the `trapped' attribute). In terms of debugging, I think trapping let-binding and let-unbinding is definitely useful, so I think it's worth the effort to try and catch both cases. > I should clarify that this only applies to dynamically-bound > variables, lexical variables are never trapped. Yes, that's normal and right. Fundamentally, lexical variables are anonymous, anyway. Stefan