GNU bug report logs -
#33114
25.2; Emacs hangs on closing a parenthesis in a regexp in cperl mode
Previous Next
Reported by: Vincent Lefevre <vincent <at> vinc17.net>
Date: Mon, 22 Oct 2018 00:43:01 UTC
Severity: normal
Found in version 25.2
Fixed in version 26.2
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Vincent Lefevre <vincent <at> 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)
This bug report was last modified 6 years and 139 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.