Subject: bug#15778: 24.3; cperl-mode causes emacs to lock up

From: Stephen Berman <[email-masked]>
Date: Sun, 03 Nov 2013 20:39:45 +0100

On Sun, 03 Nov 2013 08:59:02 -0500 Nathan Trapuzzano <[email-masked]> wrote:

> Stephen Berman <[email-masked]> writes:
>
>> I also tried and failed to get Edebug to kick in here, but I did make an
>> observation that surprised me but I assume is somehow relevant: if I
>> start Emacs with -Q, insert your sample perl code in a new buffer,
>> invoke cperl-mode, go to line 44 and type C-k, Emacs hangs, as you
>> discovered -- but if, after starting with -Q and inserting the sample
>> code I first invoke perl-mode and after the buffer fontifies invoke
>> cperl-mode, now when I go to line 44, C-k kills the line as it should
>> and there is no other problem, even if I then change the buffer to some
>> other mode and then back to cperl-mode again.
>
> Since there seems to be inconsistend behavior, would you mind trying my
> patch and making sure none of the scenarios you've tried so far causes
> Emacs to hang?

After applying your patch and byte-compiling the patched cperl-mode.el,
the above recipe no longer makes Emacs infloop.  (It still infloops when
I just apply the patch and evaluate the patched
cperl-font-lock-fontify-region-function without compiling the library).

Steve Berman