[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55744: infinite loop
From: |
Lars Ingebrigtsen |
Subject: |
bug#55744: infinite loop |
Date: |
Wed, 01 Jun 2022 17:35:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
"Daniel R. Grayson" <danielrichardgrayson@gmail.com> writes:
> Okay, I did that, and it seems to be this:
>
> (defconst M2-mode-font-lock-keywords
> '("///\\(/?/?[^/]\\|\\(//\\)*////[^/]\\)*\\(//\\)*///" .
> 'font-lock-string-face) )
That's a regexp with a lot of backtracking, I think (i.e., elements that
can be matched both by the ?'s as well as the two *'s). So matching
this will be slow, which results in the hangs you're seeing when Emacs
is trying to match that to the text in the buffer.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no