From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#21072: Brave new mark-defun (and a testing tool) Date: Sun, 30 Apr 2017 18:03:37 -0400 Message-ID: References: <87o9ydrzkr.fsf@mbork.pl> <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> <878tmhogb0.fsf@users.sourceforge.net> <8760hlo9os.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493589910 6525 195.159.176.226 (30 Apr 2017 22:05:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2017 22:05:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Marcin Borkowski , 21072@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 01 00:05: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 1d4wxl-0001cB-Bq for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 May 2017 00:05:05 +0200 Original-Received: from localhost ([::1]:46030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4wxr-0001vS-6t for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Apr 2017 18:05:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4wxl-0001vF-VJ for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 18:05:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4wxi-0004jk-Nh for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 18:05:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d4wxi-0004jd-Kt for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 18:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d4wxi-0004XH-As for bug-gnu-emacs@gnu.org; Sun, 30 Apr 2017 18:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Apr 2017 22:05: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.149358984617366 (code B ref 21072); Sun, 30 Apr 2017 22:05:02 +0000 Original-Received: (at 21072) by debbugs.gnu.org; 30 Apr 2017 22:04:06 +0000 Original-Received: from localhost ([127.0.0.1]:48184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4wwn-0004W2-N7 for submit@debbugs.gnu.org; Sun, 30 Apr 2017 18:04:05 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:45388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4wwk-0004VX-PD for 21072@debbugs.gnu.org; Sun, 30 Apr 2017 18:04:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BoBgDRXgZZ/3Z8oWxdGgEBAQECAQEBAQgBAQEBg1WKYoV/kForAZdQhh4EAgKENkQUAQIBAQEBAQEBayiFFgEEAVYjBQsLNBIUGA2KTgixDosNAQEBBwImi1iFL4UZBZ1TnXyGc5JpgUQ2IYEKLiAILodQJIlWAQEB X-IPAS-Result: A0BoBgDRXgZZ/3Z8oWxdGgEBAQECAQEBAQgBAQEBg1WKYoV/kForAZdQhh4EAgKENkQUAQIBAQEBAQEBayiFFgEEAVYjBQsLNBIUGA2KTgixDosNAQEBBwImi1iFL4UZBZ1TnXyGc5JpgUQ2IYEKLiAILodQJIlWAQEB X-IronPort-AV: E=Sophos;i="5.37,397,1488862800"; d="scan'208";a="309721886" Original-Received: from 108-161-124-118.dsl.teksavvy.com (HELO pastel.home) ([108.161.124.118]) by smtp.teksavvy.com with ESMTP; 30 Apr 2017 18:03:37 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9AC716286D; Sun, 30 Apr 2017 18:03:37 -0400 (EDT) In-Reply-To: <8760hlo9os.fsf@users.sourceforge.net> (npostavs's message of "Sun, 30 Apr 2017 17:41:07 -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:132141 Archived-At: >>> 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