From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#28747: 26.0.60; Usage of "&rest body" in Edebug specs Date: Wed, 16 Oct 2019 04:45:40 +0200 Message-ID: <87sgnto1bf.fsf@gnus.org> References: <87o9phznq7.fsf@runbox.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="109724"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 28747@debbugs.gnu.org To: Gemini Lasswell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 16 04:46:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iKZKF-000SRO-RE for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Oct 2019 04:46:11 +0200 Original-Received: from localhost ([::1]:35346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKZKE-0008RQ-M2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2019 22:46:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60298) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKZK7-0008Om-Fm for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 22:46:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKZK6-0004Lr-8y for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 22:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKZK6-0004Ln-5M for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 22:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iKZK6-0005aN-1e for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 22:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Oct 2019 02:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28747 X-GNU-PR-Package: emacs Original-Received: via spool by 28747-submit@debbugs.gnu.org id=B28747.157119395021446 (code B ref 28747); Wed, 16 Oct 2019 02:46:01 +0000 Original-Received: (at 28747) by debbugs.gnu.org; 16 Oct 2019 02:45:50 +0000 Original-Received: from localhost ([127.0.0.1]:45069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKZJs-0005Zn-Cd for submit@debbugs.gnu.org; Tue, 15 Oct 2019 22:45:50 -0400 Original-Received: from [80.91.231.51] (port=45026 helo=quimby.gnus.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKZJp-0005Zd-Td for 28747@debbugs.gnu.org; Tue, 15 Oct 2019 22:45:46 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iKZJl-00081E-CK; Wed, 16 Oct 2019 04:45:43 +0200 In-Reply-To: <87o9phznq7.fsf@runbox.com> (Gemini Lasswell's message of "Sun, 08 Oct 2017 08:02:56 -0700") 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: 209.51.188.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:169413 Archived-At: Gemini Lasswell writes: > The symbol &rest in an Edebug spec has a different meaning than it has > in an argument list. In particular, "&rest body" in an Edebug spec is > erroneous usage because it is asking Edebug to match something that > can match nothing (body) as many times as it can, which makes an > infinite loop. [...] > Here are the macros I've found that have this incorrect usage of &rest > in their Edebug specs: > > crm--completion-command > easy-mmode-define-navigation > inline--letlisteval > inline--leteval > ses--letref I've now fixed these. > Edebug specs have been using &rest for a really long time and it > mostly gets used correctly. But &repeat would be better, since it > actually describes the functionality and doesn't have a completely > different and more common usage in argument lists. > > Here's a little example of what an Edebug spec would look like with > &repeat in place of &rest: > > (defmacro msgmac (&rest args) > (declare (debug ("start" [&repeat "middle"] "end"))) > `(message "%s" ',args)) > > (defun use-msgmac () > (msgmac start end) > (msgmac start middle end) > (msgmac start middle middle end)) > > Does anyone have thoughts on the idea of adding &repeat as a synonym > for &rest in Edebug specs, with the goal of moving &rest towards > obsolescence eventually? I agree that this would be a lot clearer and probably less error-prone than &rest. Does anybody have an opinion here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no