From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#21072: Brave new mark-defun (and a testing tool) Date: Sun, 30 Apr 2017 15:18:11 -0400 Message-ID: <878tmhogb0.fsf@users.sourceforge.net> References: <87o9ydrzkr.fsf@mbork.pl> <87wpcpw61w.fsf@jane> <83o9xdghmc.fsf@gnu.org> <87o9wkoald.fsf@jane> <87a881ofsu.fsf@jane> <87k272wh8x.fsf@users.sourceforge.net> <871st4aal7.fsf@jane> <87tw5l7v26.fsf@jane> <877f2hs1nw.fsf@users.sourceforge.net> <87zifa9ce5.fsf@jane> <87shl0pbcg.fsf@users.sourceforge.net> <87shky9ez8.fsf@jane> <8737cyotmt.fsf@users.sourceforge.net> <87h919yf5g.fsf@jane> <8737cpylcb.fsf@jane> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493579830 28102 195.159.176.226 (30 Apr 2017 19:17:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2017 19:17:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: Marcin Borkowski , 21072@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 30 21:17:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4uLB-0007D2-Ow for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Apr 2017 21:17:05 +0200 Original-Received: from localhost ([::1]:45667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4uLH-0007eT-Bb for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Apr 2017 15:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4uLB-0007dj-Hs for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 15:17:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4uL8-0003tz-Cq for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 15:17:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49860) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d4uL8-0003tp-7l for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 15:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d4uL8-0000Yl-2R for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 15:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Apr 2017 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21072 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21072-submit@debbugs.gnu.org id=B21072.14935798082125 (code B ref 21072); Sun, 30 Apr 2017 19:17:02 +0000 Original-Received: (at 21072) by debbugs.gnu.org; 30 Apr 2017 19:16:48 +0000 Original-Received: from localhost ([127.0.0.1]:48059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4uKu-0000YD-5Q for submit@debbugs.gnu.org; Sun, 30 Apr 2017 15:16:48 -0400 Original-Received: from mail-it0-f67.google.com ([209.85.214.67]:34159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4uKs-0000Xy-QJ for 21072@debbugs.gnu.org; Sun, 30 Apr 2017 15:16:47 -0400 Original-Received: by mail-it0-f67.google.com with SMTP id c26so10697111itd.1 for <21072@debbugs.gnu.org>; Sun, 30 Apr 2017 12:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=nIG9+Ed8vDX22YPVEXOCAPhRzQyfoZqTT17pot7leVg=; b=lDAuL2aa8cgE6ZnhpDMNYbHKR6PC9qSRAVctfK1t6qlfeYnhMOuAqs6nSYzQS8+dlA GnJD0hLSYS4kXWo/dTsYatZm02RgDFG3u2qHbgHdW+1Tqdh+CuptjB/VSbWL6Lh57HAx 4zrHuIpxnIIRT6va2BQk3eQouPCZ3trm61wwnpJ95xoMoJW8zZTrtm7ZlTOUlS1GUDkv h7edMrI3kmMMiZvfifILJfUAozId2IL+HWnHZHSiRxj5tCDYi+Duq5gqaOghNaPMZ493 6AyIZ7fYnrkgW7kBEHDE9cMtDoXdlpb4pCuCmUjOJ3Ii722oX91X14R2bNBECHhTQoNo 4P9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=nIG9+Ed8vDX22YPVEXOCAPhRzQyfoZqTT17pot7leVg=; b=hdtr1SP+Ki1DQJpco+f+8QBLWrbnE7lJhCqzjWvbY4TMIOWBjM/fWZaNu3X/H7dyM4 5CSymy/E0438AfrD/uWx4hbLbWduSCMNi9oh5dZGkaBfwMLbSgxz8SPL5Vctsr48d6TL ecQrPUKH8LQXIfAz2F20p93Ma4Td34JM3wbiiR0vF/pI1EEqZhPC3tQuAIeUe2spZ6Xd LxYW653KiqiQmGKUm7PIusar4Klhukmaech6ln0tHAbduxjieFsL9doX+qaLFORE5MWD wfC1IjyU+lYtCVdePMFdK15vS+gNWZ3KqQQ4FqGYIKidXDEQKSoBdNuN/xMEFFw5AT2h K9Lg== X-Gm-Message-State: AN3rC/5KQJ0xLOrH4k0GoNa3q7LGScz/TAwbN5SIRCFhIMssmB/CDnj4 PrMQeBkNkPo11gMt X-Received: by 10.36.118.75 with SMTP id z72mr18430236itb.33.1493579800997; Sun, 30 Apr 2017 12:16:40 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id n85sm5395118ioi.6.2017.04.30.12.16.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Apr 2017 12:16:40 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 30 Apr 2017 14:46:23 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132137 Archived-At: Stefan Monnier 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)