unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19873: Ill-formed regular expression is constructed in forward-paragraph.
@ 2015-02-15 10:31 Alan Mackenzie
  2017-02-26 16:44 ` Marcin Borkowski
  0 siblings, 1 reply; 11+ messages in thread
From: Alan Mackenzie @ 2015-02-15 10:31 UTC (permalink / raw)
  To: 19873

Hello, Emacs!

In forward-paragraph, L37, a regular expression is constructed as
follows:

(let* ...
 (sp-parstart (concat "^[ \t]*\\(?:" parstart "\\|" parsep "\\)"))
 ...)

.  Here parstart and parsep are, more or less,
paragraph-{start,separate}.

The problem is that parstart and parsep themselves are likely to begin
with "[ \t]*" (the default values certainly do), so we have two
consecutive matchers for an arbitrary amount of whitespace.  This causes
the regexp engine to run very slowly when a line starts with lots of WS
but doesn't match.

This problem seems to be the cause of bug # 19846 (where holding down the
spacebar inside a C comment causes Emacs to seize up when auto-fill mode
is enabled).

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-12-03 16:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-15 10:31 bug#19873: Ill-formed regular expression is constructed in forward-paragraph Alan Mackenzie
2017-02-26 16:44 ` Marcin Borkowski
2017-02-26 16:57   ` Eli Zaretskii
2017-02-26 18:48     ` Marcin Borkowski
2017-03-07 16:47   ` Eli Zaretskii
2017-03-09 21:04   ` Alan Mackenzie
2021-12-02 10:39     ` Lars Ingebrigtsen
2021-12-02 10:44       ` Lars Ingebrigtsen
2021-12-02 11:17         ` Lars Ingebrigtsen
2021-12-02 20:45       ` Alan Mackenzie
2021-12-03 16:15         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).