Try to speed-up display of many all-blank lines

* src/bidi.c (bidi_initialize): Use anchored regexps for
paragraph start and paragraph separator sequences.  (Bug#23457)
This commit is contained in:
Eli Zaretskii 2016-05-07 11:00:36 +03:00
parent 26171e0277
commit fa6a6edd1d

View file

@ -1107,15 +1107,9 @@ bidi_initialize (void)
emacs_abort ();
staticpro (&bidi_brackets_table);
DEFSYM (Qparagraph_start, "paragraph-start");
paragraph_start_re = Fsymbol_value (Qparagraph_start);
if (!STRINGP (paragraph_start_re))
paragraph_start_re = build_string ("\f\\|[ \t]*$");
paragraph_start_re = build_string ("^\\(\f\\|[ \t]*\\)$");
staticpro (&paragraph_start_re);
DEFSYM (Qparagraph_separate, "paragraph-separate");
paragraph_separate_re = Fsymbol_value (Qparagraph_separate);
if (!STRINGP (paragraph_separate_re))
paragraph_separate_re = build_string ("[ \t\f]*$");
paragraph_separate_re = build_string ("^[ \t\f]*$");
staticpro (&paragraph_separate_re);
bidi_cache_sp = 0;