[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: instrumenting forms in defmacro with edebug
From: |
Stefan Monnier |
Subject: |
Re: instrumenting forms in defmacro with edebug |
Date: |
Wed, 28 Mar 2012 19:16:40 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> (defmacro macro_name (arg1 &rest body)
>> (declare (debug t))
>> (edebug-\`
>> (let (var1 var2)
>> (form1)
>> (form2)
>> ,@body
>> (form3))))
> I may be suffering from thick-headedness, but I gave your suggestion a
> try and couldn't make it work. There are several things I don't
> understand from your suggestion. I don't understand "(edebug-\`".
`<exp> is a shorthand for (\` <exp>). "edebug-\`" is a symbol.
> construct. I tried a number of variations on your suggestion, but it
> seems that using "edebug-eval-defun" always complains about ",@" when
> the "`" backquote character is in the line ahead of "(let".
Oh, indeed, the Emacs-23 reader only accepts the ,<exp> and ,@<exp>
when they occur within a `<exp>. So either try it with Emacs-24, or
replace the ,@body shorthand with its spelled out equivalent (\,@ body).
Stefan