From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#16184: 24.3.50; edebug and eval-when-compiler don't work together Date: Fri, 20 Dec 2013 09:01:35 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1387497733 23604 80.91.229.3 (20 Dec 2013 00:02:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Dec 2013 00:02:13 +0000 (UTC) Cc: Anders Lindgren To: 16184@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 20 01:02:19 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VtnXl-00022i-8F for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Dec 2013 01:02:17 +0100 Original-Received: from localhost ([::1]:46943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtnXk-0006k1-Nd for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Dec 2013 19:02:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtnXd-0006iq-1m for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2013 19:02:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtnXY-000377-1z for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2013 19:02:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtnXX-00036y-Uq for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2013 19:02:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VtnXX-0000gb-3H for bug-gnu-emacs@gnu.org; Thu, 19 Dec 2013 19:02:03 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2013 00:02: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.13874977032606 (code B ref 16184); Fri, 20 Dec 2013 00:02:02 +0000 Original-Received: (at 16184) by debbugs.gnu.org; 20 Dec 2013 00:01:43 +0000 Original-Received: from localhost ([127.0.0.1]:59166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtnXC-0000fy-EO for submit@debbugs.gnu.org; Thu, 19 Dec 2013 19:01:42 -0500 Original-Received: from mail-hampton.hostforweb.net ([216.246.15.223]:38563 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VtnX9-0000fn-Bv for 16184@debbugs.gnu.org; Thu, 19 Dec 2013 19:01:39 -0500 Original-Received: from localhost.localdomain ([127.0.0.1]:48605 helo=localhost) by hampton.hostforweb.net with smtp (Exim 4.80.1) (envelope-from ) id 1VtnX6-003NP1-Ec; Thu, 19 Dec 2013 18:01:37 -0600 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.130008 (=?UTF-8?Q?=E7=9C=9F?= Gnus v0.8) Emacs/24.3.50 (i686-pc-cygwin) Cancel-Lock: sha1:c3cS7CnHtuBPEYg/p/VJc2LGLoA= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: acl_c_authenticated_local_user: root X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82252 Archived-At: --=-=-= Anders Lindgren wrote: > The construct 'eval-when-compile' seems to throw debug off. When > pressing C-u C-M-x on the following, an error is issued. This worked > correctly in 24.3. This makes it hard to use edebug on functions in > cc-mode (like c-font-lock-declarations), as it makes heavy use of > eval-when-compile. > (defun test (limit) > (eval-when-compile > (boundp 'parse-sexp-lookup-properties))) I'm not sure of it but the patch below seems to solve it. This works for the bug#14646 case[1], too. WDYT? [1] --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- lisp/emacs-lisp/byte-run.el~ 2013-11-21 22:12:14 +0000 +++ lisp/emacs-lisp/byte-run.el 2013-12-19 23:45:41 +0000 @@ -391,7 +391,7 @@ "Like `progn', but evaluates the body at compile time if you're compiling. Thus, the result of the body appears to the compiler as a quoted constant. In interpreted code, this is entirely equivalent to `progn'." - (declare (debug (def-body)) (indent 0)) + (declare (debug (&rest def-form)) (indent 0)) (list 'quote (eval (cons 'progn body) lexical-binding))) (defmacro eval-and-compile (&rest body) --- lisp/progmodes/cc-defs.el~ 2013-06-02 22:06:34 +0000 +++ lisp/progmodes/cc-defs.el 2013-12-19 23:45:40 +0000 @@ -1137,7 +1137,7 @@ ;; Make edebug understand the macros. ;(eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. ; '(progn -(def-edebug-spec cc-eval-when-compile t) +(def-edebug-spec cc-eval-when-compile (&rest def-form)) (def-edebug-spec c-point t) (def-edebug-spec c-set-region-active t) (def-edebug-spec c-safe t) --=-=-=--