all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Vincent Lefevre <vincent@vinc17.net>
Cc: 33114@debbugs.gnu.org
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	[thread overview]
Message-ID: <83r2ggsna8.fsf@gnu.org> (raw)
In-Reply-To: <87efcix1cy.fsf@zira.vinc17.org> (message from Vincent Lefevre on Mon, 22 Oct 2018 02:37:49 +0200)

> From: Vincent Lefevre <vincent@vinc17.net>
> 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)





  parent reply	other threads:[~2018-10-23 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22  0:37 bug#33114: 25.2; Emacs hangs on closing a perenthesis in a regexp in cperl mode Vincent Lefevre
     [not found] ` <mailman.2564.1540168987.1284.bug-gnu-emacs@gnu.org>
2018-10-23 14:46   ` Alan Mackenzie
2018-10-23 15:19 ` Eli Zaretskii [this message]
2018-10-25 11:21   ` Vincent Lefevre
2018-10-25 14:59     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r2ggsna8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33114@debbugs.gnu.org \
    --cc=vincent@vinc17.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.