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

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

bug#21072: Brave new mark-defun (and a testing tool)


From: Stefan Monnier
Subject: bug#21072: Brave new mark-defun (and a testing tool)
Date: Sun, 30 Apr 2017 18:03:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>>> I guess it's related to the fact that the first argument is evaluated by
>>> the macro itself at compile time, with (debug t) or (debug form body) I
>>> get an error when trying to instrument one of tests using that macro:
>> 
>> Yes, you can either use (debug (sexp body)) to avoid instrumenting the
>> first arg, or you might use (debug (def-form body)) so as to warn that
>> the first argument is not evaluated at the "normal" time.

> I'm not sure exactly what def-form means, but using it gives a similar
> error.

> Debugger entered--Lisp error: (wrong-type-argument char-or-string-p
> (edebug-enter (quote test@mark-defun-no-arg-region-inactive) nil (function
> (lambda nil (edebug-after 0 3 mark-defun-test-buffer)))))
>   insert((edebug-enter (quote test@mark-defun-no-arg-region-inactive) nil
> (function (lambda nil (edebug-after 0 3 mark-defun-test-buffer)))))
>   [...]

This suggests that the first arg is not "evaluated by the macro itself
at compile time", but instead is passed unevaluated to `insert`, in
which case it can't be instrumented.


        Stefan





reply via email to

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