From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#16184: 24.3.50; edebug and eval-when-compiler don't work together Date: Sat, 31 Dec 2016 11:18:52 +0000 Message-ID: <20161231111851.GA4072@acm.fritz.box> References: <20161118224713.GA3796@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1483183214 7025 195.159.176.226 (31 Dec 2016 11:20:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2016 11:20:14 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: David Bremner , Katsumi Yamaoka , 16184@debbugs.gnu.org, Anders Lindgren , Benaiah Mischenko To: Gemini Lasswell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 31 12:20:09 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 1cNHhm-0000nH-RZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2016 12:20:06 +0100 Original-Received: from localhost ([::1]:43460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNHhr-00029a-Uu for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2016 06:20:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNHhm-000287-3K for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 06:20:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cNHhi-0001fo-VQ for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 06:20:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cNHhi-0001fk-Rp for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 06:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cNHhi-0006wK-Gp for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 06:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Dec 2016 11:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16184 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16184-submit@debbugs.gnu.org id=B16184.148318315626617 (code B ref 16184); Sat, 31 Dec 2016 11:20:02 +0000 Original-Received: (at 16184) by debbugs.gnu.org; 31 Dec 2016 11:19:16 +0000 Original-Received: from localhost ([127.0.0.1]:60884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNHgy-0006vF-HR for submit@debbugs.gnu.org; Sat, 31 Dec 2016 06:19:16 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:28841 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cNHgw-0006v6-Li for 16184@debbugs.gnu.org; Sat, 31 Dec 2016 06:19:15 -0500 Original-Received: (qmail 56748 invoked by uid 3782); 31 Dec 2016 11:19:13 -0000 Original-Received: from acm.muc.de (p548C6268.dip0.t-ipconnect.de [84.140.98.104]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 31 Dec 2016 12:19:11 +0100 Original-Received: (qmail 4277 invoked by uid 1000); 31 Dec 2016 11:18:52 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:127621 Archived-At: Hello, Gemini. On Fri, Dec 30, 2016 at 03:27:37PM -0800, Gemini Lasswell wrote: > Alan Mackenzie writes: > > . During this instrumentation, the inside of the cc-eval-when-compile > > form gets run, in particular, the (edebug-before 2). At this stage, > > since edebug-enter hasn't been run at all, edebug-offset-indices is still > > nil. The (edebug-before 2) thus attempts (setcar nil 2), which throws > > the error. > I haven't able to reproduce the bug with cc-eval-when-compile, > just eval-and-compile. But the thing that is supposed to make Edebug > wrap a form in edebug-enter is the use of def-form or def-body in the > Edebug spec. This is extremely poorly documented, even in the source code, if it is documented at all. I don't really understand the documentation of the edebug spec in general. > It works for eval-when-compile which has the Edebug spec (&rest > def-form). The body of eval-and-compile doesn't get wrapped because > its Edebug spec is t, so the bug happens there. Ah! I think I'm beginning to understand all this. Looking at the source code, it seems a def-form or def-body causes the form to be wrapping by edebug-enter, but not much else does. > cc-eval-when-compile has the same Edebug spec as eval-when-compile, so > its body should get wrapped by edebug-enter. If that's not happening in > your Emacs, it's a bug in Edebug which is different from the > eval-and-compile Edebug spec bug. I think you've persuaded me that my fix to this bug was wrong. Rather than adapting initialisations to cope with edebug-enter not being called, I should have diagnosed _why_ an edebug-enter is not being generated during instrumentation of a cc-eval-when-compile form. I'm working on this now. Thank you indeed for drawing my attention to these edebug specs. -- Alan Mackenzie (Nuremberg, Germany).