diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/standard-regexps.html | |
new repository
Diffstat (limited to 'devdocs/elisp/standard-regexps.html')
| -rw-r--r-- | devdocs/elisp/standard-regexps.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/devdocs/elisp/standard-regexps.html b/devdocs/elisp/standard-regexps.html new file mode 100644 index 00000000..143613c5 --- /dev/null +++ b/devdocs/elisp/standard-regexps.html @@ -0,0 +1,18 @@ + <h3 class="section">Standard Regular Expressions Used in Editing</h3> <p>This section describes some variables that hold regular expressions used for certain purposes in editing: </p> <dl> <dt id="page-delimiter">User Option: <strong>page-delimiter</strong> +</dt> <dd><p>This is the regular expression describing line-beginnings that separate pages. The default value is <code>"^\014"</code> (i.e., <code>"^^L"</code> or <code>"^\C-l"</code>); this matches a line that starts with a formfeed character. </p></dd> +</dl> <p>The following two regular expressions should <em>not</em> assume the match always starts at the beginning of a line; they should not use ‘<samp>^</samp>’ to anchor the match. Most often, the paragraph commands do check for a match only at the beginning of a line, which means that ‘<samp>^</samp>’ would be superfluous. When there is a nonzero left margin, they accept matches that start after the left margin. In that case, a ‘<samp>^</samp>’ would be incorrect. However, a ‘<samp>^</samp>’ is harmless in modes where a left margin is never used. </p> <dl> <dt id="paragraph-separate">User Option: <strong>paragraph-separate</strong> +</dt> <dd><p>This is the regular expression for recognizing the beginning of a line that separates paragraphs. (If you change this, you may have to change <code>paragraph-start</code> also.) The default value is <code>"[ \t\f]*$"</code>, which matches a line that consists entirely of spaces, tabs, and form feeds (after its left margin). </p></dd> +</dl> <dl> <dt id="paragraph-start">User Option: <strong>paragraph-start</strong> +</dt> <dd><p>This is the regular expression for recognizing the beginning of a line that starts <em>or</em> separates paragraphs. The default value is <code>"\f\\|[ \t]*$"</code>, which matches a line containing only whitespace or starting with a form feed (after its left margin). </p></dd> +</dl> <dl> <dt id="sentence-end">User Option: <strong>sentence-end</strong> +</dt> <dd> +<p>If non-<code>nil</code>, the value should be a regular expression describing the end of a sentence, including the whitespace following the sentence. (All paragraph boundaries also end sentences, regardless.) </p> <p>If the value is <code>nil</code>, as it is by default, then the function <code>sentence-end</code> constructs the regexp. That is why you should always call the function <code>sentence-end</code> to obtain the regexp to be used to recognize the end of a sentence. </p> +</dd> +</dl> <dl> <dt id="sentence-end">Function: <strong>sentence-end</strong> +</dt> <dd><p>This function returns the value of the variable <code>sentence-end</code>, if non-<code>nil</code>. Otherwise it returns a default value based on the values of the variables <code>sentence-end-double-space</code> (see <a href="filling#Definition-of-sentence_002dend_002ddouble_002dspace">Definition of sentence-end-double-space</a>), <code>sentence-end-without-period</code>, and <code>sentence-end-without-space</code>. </p></dd> +</dl><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Regexps.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Regexps.html</a> + </p> +</div> |
