Problem
When i evaluate the paragraph-start variable in the major mode lisp-mode, it has the following value
"^L\\|[ ]*$"
In emacs the ^L
is displayed in red color so I'm not sure if there is some character in between that I could not be displayed properly.
According to the elisp manual paragraph-start is a buffer local variable and is set "to specify that only blank lines separate paragrap" in Lisp mode. However, I don't see how the regex above matches blank line. I would parse the regex above in the following way:
^L\\
: This matches lines that begin withL\
, since the anchor^
indicates start of string or line and\\
indicates an escaped\
.|
indicates an or joining the regex before (1) and after (3).[ ]*$
: The first part[ ]
is a character class containing just the space character (why are there multiple space characters in it?). The quantifier*
indicates that the preceding character class, which is only space, shall be matched zero or more times at the End which is indicated by the anchor$
.
Furthermore, the emacs (25.2.1) documentation C-hv paragraph-start
states that:
This regexp should match lines that separate paragraphs and should also match lines that start a paragraph
Question
The regular expression (3) should either match the end of a any line, if no white spaces were found, or a string of spaces at the end of each line.
- Does (3) match "lines that separate paragraphs"? If yes, why? If not, what does it mean?
Regular expression (1) should only match a line beginning with L\
as far as I can see.
- Does (1) match "lines that start a paragraph" If yes, why? If not, what does it mean?
I probably messed up somewhere by misunderstanding either the documentation or the regex. However, a small explanation where I went wrong would be greatly appreciated.
As a reference for the regex matching i used the online emacs documentation.