[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21072: Brave new mark-defun (and a testing tool)
From: |
npostavs |
Subject: |
bug#21072: Brave new mark-defun (and a testing tool) |
Date: |
Sun, 30 Apr 2017 15:18:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>> 1. What is the difference between (debug t) and (debug form body)? From
>>>> my understanding of the manual, there seems to be none.
>>> Indeed, no significant difference.
>> Oops, I meant (debug sexp body), then I changed it for some reason and
>> forgot to change back to the correct thing.
>
> Ah that changes everything: (debug (sexp body)) is quite different from
> (debug t) since it says that the first argument is not an expression
> (and hence shouldn't be instrumented).
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:
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p
(edebug-after 0 3 mark-defun-test-buffer))
insert((edebug-after 0 3 mark-defun-test-buffer))
(progn (insert (cond ((symbolp contents) (symbol-value contents)) (t
contents))) (goto-char (point-min)) [...])
(unwind-protect [...] (and (buffer-name temp-buffer) (kill-buffer
temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) [...])
(let ((temp-buffer (generate-new-buffer " *temp*"))) [...])
(let* ((var-pos nil) (text (let ((temp-buffer (generate-new-buffer "
*temp*"))) [...]))) [...])
(closure (t) (contents &rest body) "Create an `emacs-lisp-mode' enabled temp
buffer with CONTENTS[...]
macroexpand((elisp-tests-with-temp-buffer [...]
[...]
edebug-eval-defun((4))
apply(edebug-eval-defun (4))
eval-defun((4))
funcall-interactively(eval-defun (4))
call-interactively(eval-defun nil nil)
command-execute(eval-defun)
- bug#21072: Brave new mark-defun (and a testing tool), (continued)
- bug#21072: Brave new mark-defun (and a testing tool), Marcin Borkowski, 2017/04/27
- bug#21072: Brave new mark-defun (and a testing tool), Noam Postavsky, 2017/04/27
- bug#21072: Brave new mark-defun (and a testing tool), Marcin Borkowski, 2017/04/30
- bug#21072: Brave new mark-defun (and a testing tool), Marcin Borkowski, 2017/04/30
- bug#21072: Brave new mark-defun (and a testing tool), Stefan Monnier, 2017/04/30
- bug#21072: Brave new mark-defun (and a testing tool), Noam Postavsky, 2017/04/30
- bug#21072: Brave new mark-defun (and a testing tool), Stefan Monnier, 2017/04/30
- bug#21072: Brave new mark-defun (and a testing tool),
npostavs <=
- bug#21072: Brave new mark-defun (and a testing tool), Stefan Monnier, 2017/04/30
- bug#21072: Brave new mark-defun (and a testing tool), npostavs, 2017/04/30
- bug#21072: Brave new mark-defun (and a testing tool), Stefan Monnier, 2017/04/30
- bug#21072: Brave new mark-defun (and a testing tool), npostavs, 2017/04/30