help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Evaluation of macro arguments


From: Stefan Monnier
Subject: Re: Evaluation of macro arguments
Date: Tue, 05 Jan 2016 07:55:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> Do I get it correctly that if I want to write an Edebug spec for this
> macro, I should mark the second argument as _not evaluated_, because its
> value is actually quoted?

That's right.

> (Also, do I get it right that the spec for the second argument should be
> e.g. `symbolp', or - if I want to have more error-checking while
> edebugging - I should _define_ a predicate like this
>
> (defun upto-or-downto-p (symbol)
>   (memq symbol '(upto downto)))
>
> since the predicate in the edebug spec cannot be a lambda expression?

Something like it, yes (tho it's not really "checked while edebugging".
Instead, such a precise Edebug spec would cause an error (and not
a very pretty one) when you ask Edebug to annotate the code).
I'd use a spec like (declare (debug (form symbolp form))).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]