From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#10483: [PATCH] cperl-mode: Avoid endless loop Date: Fri, 04 Sep 2020 05:17:45 +0200 Message-ID: <87k0xafcx2.fsf@gnus.org> References: <83o8mqwwx2.fsf@gnu.org> <83k0xewszf.fsf@gnu.org> <922046dc-34fa-487d-4695-6597f8db148e@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5401"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 10483@debbugs.gnu.org To: Harald =?UTF-8?Q?J=C3=B6rg?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 04 05:18:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kE2Er-0001Hx-OS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 05:18:09 +0200 Original-Received: from localhost ([::1]:52744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kE2Eq-0005vV-Qw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Sep 2020 23:18:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kE2Ek-0005v4-3g for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 23:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kE2Ej-0001Xo-QS for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 23:18:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kE2Ej-0001Hw-MR for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 23:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Sep 2020 03:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10483 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 10483-submit@debbugs.gnu.org id=B10483.15991894784942 (code B ref 10483); Fri, 04 Sep 2020 03:18:01 +0000 Original-Received: (at 10483) by debbugs.gnu.org; 4 Sep 2020 03:17:58 +0000 Original-Received: from localhost ([127.0.0.1]:36751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kE2Eg-0001He-2G for submit@debbugs.gnu.org; Thu, 03 Sep 2020 23:17:58 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:43020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kE2Ee-0001HQ-69 for 10483@debbugs.gnu.org; Thu, 03 Sep 2020 23:17:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Op1HEgiQtFP2qy7PBJTaSfj/S5/DziyVGJqLd8vTkW8=; b=HQvpgD3HsHm13pcseBOQ1LZmtO 98vG/P5uErL6vU5zs74I5meAksD/QcxNZw9Un3jEf9i2oNW2Y2UmdI2gOXr6BMJdJbBS/bpuF7+ek o3Ez2HAaxnyU3WBKLOz+agF1fGBmn0jle4kgNkCd8yhjMG3t6K/mHlYiT697p4fT0rNM=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kE2EV-0001hU-0H; Fri, 04 Sep 2020 05:17:49 +0200 X-Now-Playing: Machinedrum's _Vapor City Citizenship Programme_: "Knowfuture" In-Reply-To: <922046dc-34fa-487d-4695-6597f8db148e@posteo.de> ("Harald =?UTF-8?Q?J=C3=B6rg?="'s message of "Tue, 1 Sep 2020 18:12:31 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187068 Archived-At: Harald J=C3=B6rg writes: > So be it: My attempt to do this is attached, together with tests > to verify that my loop termination isn't harmful to the function. Great; I've applied your fix (along with the test) to Emacs 28. > As always, a review is welcome. I still haven't much experience > in Elisp. Looks good to me. The only detail is that we normally want the first line of a doc string to be a complete sentence, and in one case it wasn't: +(ert-deftest cperl-mode-test-bug-10483 () + "Verifies that a piece of code which ends in a paren without a +statement terminato ron tne same line does not loop forever. The But this is in the test harness, so I don't think we really have much of a style convention going here, so I didn't fix that up before applying. > I haven't found examples to steal from, and also missed the > fork/waitpid stuff which I use for such tasks in Perl. Yeah... Perhaps Emacs should grow some convenience functions for this stuff? Anyway, the patch fixes the reported bug here, so I'm closing this bug report. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no