blob: 186313988f1aa1c96e09bc1d63d15b61bc37f837 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<h4 class="subsection">Indentation Primitives</h4> <p>This section describes the primitive functions used to count and insert indentation. The functions in the following sections use these primitives. See <a href="size-of-displayed-text">Size of Displayed Text</a>, for related functions. </p> <dl> <dt id="current-indentation">Function: <strong>current-indentation</strong>
</dt> <dd>
<p>This function returns the indentation of the current line, which is the horizontal position of the first nonblank character. If the contents are entirely blank, then this is the horizontal position of the end of the line. </p> <p>This function considers invisible text as having zero width, unless <code>buffer-invisibility-spec</code> specifies that invisible text should be displayed as ellipsis. See <a href="invisible-text">Invisible Text</a>. </p>
</dd>
</dl> <dl> <dt id="indent-to">Command: <strong>indent-to</strong> <em>column &optional minimum</em>
</dt> <dd>
<p>This function indents from point with tabs and spaces until <var>column</var> is reached. If <var>minimum</var> is specified and non-<code>nil</code>, then at least that many spaces are inserted even if this requires going beyond <var>column</var>. Otherwise the function does nothing if point is already beyond <var>column</var>. The value is the column at which the inserted indentation ends. </p> <p>The inserted whitespace characters inherit text properties from the surrounding text (usually, from the preceding text only). See <a href="sticky-properties">Sticky Properties</a>. </p>
</dd>
</dl> <dl> <dt id="indent-tabs-mode">User Option: <strong>indent-tabs-mode</strong>
</dt> <dd><p>If this variable is non-<code>nil</code>, indentation functions can insert tabs as well as spaces. Otherwise, they insert only spaces. Setting this variable automatically makes it buffer-local in the current buffer. </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/Primitive-Indent.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Primitive-Indent.html</a>
</p>
</div>
|