From: Katsumi Yamaoka <yamaoka@jpl.org>
To: 16184@debbugs.gnu.org
Cc: Anders Lindgren <andlind@gmail.com>
Subject: bug#16184: 24.3.50; edebug and eval-when-compiler don't work together
Date: Fri, 20 Dec 2013 09:01:35 +0900 [thread overview]
Message-ID: <b4m4n64xue8.fsf@jpl.org> (raw)
In-Reply-To: <CABr8ebZO6u8AittCrN+GvfJj+n6fj5STCem-_KBjC+V2NyEW9Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
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] <http://thread.gmane.org/gmane.emacs.bugs/80778>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1009 bytes --]
--- 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)
next prev parent reply other threads:[~2013-12-20 0:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 10:58 bug#16184: 24.3.50; edebug and eval-when-compiler don't work together Anders Lindgren
2013-12-20 0:01 ` Katsumi Yamaoka [this message]
2013-12-20 6:59 ` Anders Lindgren
2013-12-20 8:28 ` Katsumi Yamaoka
2013-12-20 9:26 ` Anders Lindgren
2013-12-20 9:53 ` Katsumi Yamaoka
2013-12-20 10:30 ` Anders Lindgren
2013-12-20 12:44 ` Katsumi Yamaoka
2013-12-20 13:38 ` Anders Lindgren
2013-12-24 0:23 ` Katsumi Yamaoka
2013-12-25 22:37 ` Katsumi Yamaoka
2016-10-19 0:06 ` bug#16184: incorrect Edebug spec for eval-and-compile Gemini Lasswell
2016-11-16 1:47 ` bug#16184: confirmed in 25.1 David Bremner
2016-11-16 2:07 ` bug#16184: confirmed on 25.1.1 Benaiah Mischenko
2016-11-18 22:47 ` bug#16184: 24.3.50; edebug and eval-when-compiler don't work together Alan Mackenzie
2016-12-29 9:29 ` Alan Mackenzie
2016-12-30 20:02 ` Anders Lindgren
2016-12-31 16:22 ` Alan Mackenzie
2017-01-01 0:30 ` Anders Lindgren
2017-01-01 8:37 ` Alan Mackenzie
2016-12-30 23:27 ` Gemini Lasswell
2016-12-31 11:18 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4m4n64xue8.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=16184@debbugs.gnu.org \
--cc=andlind@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.