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/margins.html | |
new repository
Diffstat (limited to 'devdocs/elisp/margins.html')
| -rw-r--r-- | devdocs/elisp/margins.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/devdocs/elisp/margins.html b/devdocs/elisp/margins.html new file mode 100644 index 00000000..edf71bae --- /dev/null +++ b/devdocs/elisp/margins.html @@ -0,0 +1,35 @@ + <h3 class="section">Margins for Filling</h3> <dl> <dt id="fill-prefix">User Option: <strong>fill-prefix</strong> +</dt> <dd> +<p>This buffer-local variable, if non-<code>nil</code>, specifies a string of text that appears at the beginning of normal text lines and should be disregarded when filling them. Any line that fails to start with the fill prefix is considered the start of a paragraph; so is any line that starts with the fill prefix followed by additional whitespace. Lines that start with the fill prefix but no additional whitespace are ordinary text lines that can be filled together. The resulting filled lines also start with the fill prefix. </p> <p>The fill prefix follows the left margin whitespace, if any. </p> +</dd> +</dl> <dl> <dt id="fill-column">User Option: <strong>fill-column</strong> +</dt> <dd> +<p>This buffer-local variable specifies the maximum width of filled lines. Its value should be an integer, which is a number of columns. All the filling, justification, and centering commands are affected by this variable, including Auto Fill mode (see <a href="auto-filling">Auto Filling</a>). </p> <p>As a practical matter, if you are writing text for other people to read, you should set <code>fill-column</code> to no more than 70. Otherwise the line will be too long for people to read comfortably, and this can make the text seem clumsy. </p> <p>The default value for <code>fill-column</code> is 70. To disable Auto Fill mode in a specific mode, you could say something like: </p> <div class="lisp"> <pre class="lisp">(add-hook 'foo-mode-hook (lambda () (auto-fill-mode -1)) +</pre> +</div> </dd> +</dl> <dl> <dt id="set-left-margin">Command: <strong>set-left-margin</strong> <em>from to margin</em> +</dt> <dd><p>This sets the <code>left-margin</code> property on the text from <var>from</var> to <var>to</var> to the value <var>margin</var>. If Auto Fill mode is enabled, this command also refills the region to fit the new margin. </p></dd> +</dl> <dl> <dt id="set-right-margin">Command: <strong>set-right-margin</strong> <em>from to margin</em> +</dt> <dd><p>This sets the <code>right-margin</code> property on the text from <var>from</var> to <var>to</var> to the value <var>margin</var>. If Auto Fill mode is enabled, this command also refills the region to fit the new margin. </p></dd> +</dl> <dl> <dt id="current-left-margin">Function: <strong>current-left-margin</strong> +</dt> <dd><p>This function returns the proper left margin value to use for filling the text around point. The value is the sum of the <code>left-margin</code> property of the character at the start of the current line (or zero if none), and the value of the variable <code>left-margin</code>. </p></dd> +</dl> <dl> <dt id="current-fill-column">Function: <strong>current-fill-column</strong> +</dt> <dd><p>This function returns the proper fill column value to use for filling the text around point. The value is the value of the <code>fill-column</code> variable, minus the value of the <code>right-margin</code> property of the character after point. </p></dd> +</dl> <dl> <dt id="move-to-left-margin">Command: <strong>move-to-left-margin</strong> <em>&optional n force</em> +</dt> <dd> +<p>This function moves point to the left margin of the current line. The column moved to is determined by calling the function <code>current-left-margin</code>. If the argument <var>n</var> is non-<code>nil</code>, <code>move-to-left-margin</code> moves forward <var>n</var>-1 lines first. </p> <p>If <var>force</var> is non-<code>nil</code>, that says to fix the line’s indentation if that doesn’t match the left margin value. </p> +</dd> +</dl> <dl> <dt id="delete-to-left-margin">Function: <strong>delete-to-left-margin</strong> <em>&optional from to</em> +</dt> <dd><p>This function removes left margin indentation from the text between <var>from</var> and <var>to</var>. The amount of indentation to delete is determined by calling <code>current-left-margin</code>. In no case does this function delete non-whitespace. If <var>from</var> and <var>to</var> are omitted, they default to the whole buffer. </p></dd> +</dl> <dl> <dt id="indent-to-left-margin">Function: <strong>indent-to-left-margin</strong> +</dt> <dd><p>This function adjusts the indentation at the beginning of the current line to the value specified by the variable <code>left-margin</code>. (That may involve either inserting or deleting whitespace.) This function is value of <code>indent-line-function</code> in Paragraph-Indent Text mode. </p></dd> +</dl> <dl> <dt id="left-margin">User Option: <strong>left-margin</strong> +</dt> <dd><p>This variable specifies the base left margin column. In Fundamental mode, <tt class="key">RET</tt> indents to this column. This variable automatically becomes buffer-local when set in any fashion. </p></dd> +</dl> <dl> <dt id="fill-nobreak-predicate">User Option: <strong>fill-nobreak-predicate</strong> +</dt> <dd><p>This variable gives major modes a way to specify not to break a line at certain places. Its value should be a list of functions. Whenever filling considers breaking the line at a certain place in the buffer, it calls each of these functions with no arguments and with point located at that place. If any of the functions returns non-<code>nil</code>, then the line won’t be broken there. </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/Margins.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Margins.html</a> + </p> +</div> |
