From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33114: 25.2; Emacs hangs on closing a perenthesis in a regexp in cperl mode Date: Tue, 23 Oct 2018 18:19:59 +0300 Message-ID: <83r2ggsna8.fsf@gnu.org> References: <87efcix1cy.fsf@zira.vinc17.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1540310823 20623 195.159.176.226 (23 Oct 2018 16:07:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2018 16:07:03 +0000 (UTC) Cc: 33114@debbugs.gnu.org To: Vincent Lefevre Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 23 18:06:59 2018 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 1gEzCs-0005FW-QS for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2018 18:06:58 +0200 Original-Received: from localhost ([::1]:43016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEzEz-0005BH-Cz for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2018 12:09:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEyhw-0007et-0y for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 11:35:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEyUQ-00087g-PI for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 11:21:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34132) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEyUQ-00087Q-KJ for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 11:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gEyUQ-0001BF-G0 for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 11:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Oct 2018 15:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33114 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33114-submit@debbugs.gnu.org id=B33114.15403080214465 (code B ref 33114); Tue, 23 Oct 2018 15:21:02 +0000 Original-Received: (at 33114) by debbugs.gnu.org; 23 Oct 2018 15:20:21 +0000 Original-Received: from localhost ([127.0.0.1]:38390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEyTk-00019x-V7 for submit@debbugs.gnu.org; Tue, 23 Oct 2018 11:20:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEyTj-00019k-4O for 33114@debbugs.gnu.org; Tue, 23 Oct 2018 11:20:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEyTZ-0007Pn-PF for 33114@debbugs.gnu.org; Tue, 23 Oct 2018 11:20:13 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEyTZ-0007PP-Jk; Tue, 23 Oct 2018 11:20:09 -0400 Original-Received: from [176.228.60.248] (port=4909 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gEyTZ-0001dU-6w; Tue, 23 Oct 2018 11:20:09 -0400 In-reply-to: <87efcix1cy.fsf@zira.vinc17.org> (message from Vincent Lefevre on Mon, 22 Oct 2018 02:37:49 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:151522 Archived-At: > From: Vincent Lefevre > Date: Mon, 22 Oct 2018 02:37:49 +0200 > > > Consider the following file: > > # -*- mode: cperl -*- > s/./(/e; > > 1. Open it with "emacs -Q". > 2. Put the cursor just after the opening parenthesis. > 3. Type ')' (closing parenthesis). > > This makes Emacs hang. A C-g alone has no effect. Several C-g in a row > may give the control back to the user. Does the patch below produce good results? (I don't use CPerl mode, so I don't know if the highlighting after the change is correct.) Thanks. --- lisp/progmodes/cperl-mode.el~0 2018-06-11 06:32:21.000000000 +0300 +++ lisp/progmodes/cperl-mode.el 2018-10-23 18:02:06.924582600 +0300 @@ -8786,7 +8786,7 @@ (goto-char new-beg))) (setq beg (point)) (goto-char end) - (while (and end + (while (and end (< end (point-max)) (progn (or (bolp) (condition-case nil (forward-line 1)