summaryrefslogtreecommitdiff
path: root/devdocs/elisp/list-motion.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/list-motion.html')
-rw-r--r--devdocs/elisp/list-motion.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/devdocs/elisp/list-motion.html b/devdocs/elisp/list-motion.html
new file mode 100644
index 00000000..7d46e539
--- /dev/null
+++ b/devdocs/elisp/list-motion.html
@@ -0,0 +1,45 @@
+ <h4 class="subsection">Moving over Balanced Expressions</h4> <p>Here are several functions concerned with balanced-parenthesis expressions (also called <em>sexps</em> in connection with moving across them in Emacs). The syntax table controls how these functions interpret various characters; see <a href="syntax-tables">Syntax Tables</a>. See <a href="parsing-expressions">Parsing Expressions</a>, for lower-level primitives for scanning sexps or parts of sexps. For user-level commands, see <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Parentheses.html#Parentheses">Commands for Editing with Parentheses</a> in <cite>The GNU Emacs Manual</cite>. </p> <dl> <dt id="forward-list">Command: <strong>forward-list</strong> <em>&amp;optional arg</em>
+</dt> <dd><p>This function moves forward across <var>arg</var> (default 1) balanced groups of parentheses. (Other syntactic entities such as words or paired string quotes are ignored.) </p></dd>
+</dl> <dl> <dt id="backward-list">Command: <strong>backward-list</strong> <em>&amp;optional arg</em>
+</dt> <dd><p>This function moves backward across <var>arg</var> (default 1) balanced groups of parentheses. (Other syntactic entities such as words or paired string quotes are ignored.) </p></dd>
+</dl> <dl> <dt id="up-list">Command: <strong>up-list</strong> <em>&amp;optional arg escape-strings no-syntax-crossing</em>
+</dt> <dd><p>This function moves forward out of <var>arg</var> (default 1) levels of parentheses. A negative argument means move backward but still to a less deep spot. If <var>escape-strings</var> is non-<code>nil</code> (as it is interactively), move out of enclosing strings as well. If <var>no-syntax-crossing</var> is non-<code>nil</code> (as it is interactively), prefer to break out of any enclosing string instead of moving to the start of a list broken across multiple strings. On error, location of point is unspecified. </p></dd>
+</dl> <dl> <dt id="backward-up-list">Command: <strong>backward-up-list</strong> <em>&amp;optional arg escape-strings no-syntax-crossing</em>
+</dt> <dd><p>This function is just like <code>up-list</code>, but with a negated argument. </p></dd>
+</dl> <dl> <dt id="down-list">Command: <strong>down-list</strong> <em>&amp;optional arg</em>
+</dt> <dd><p>This function moves forward into <var>arg</var> (default 1) levels of parentheses. A negative argument means move backward but still go deeper in parentheses (-<var>arg</var> levels). </p></dd>
+</dl> <dl> <dt id="forward-sexp">Command: <strong>forward-sexp</strong> <em>&amp;optional arg</em>
+</dt> <dd>
+<p>This function moves forward across <var>arg</var> (default 1) balanced expressions. Balanced expressions include both those delimited by parentheses and other kinds, such as words and string constants. See <a href="parsing-expressions">Parsing Expressions</a>. For example, </p> <div class="example"> <pre class="example">---------- Buffer: foo ----------
+(concat∗ "foo " (car x) y z)
+---------- Buffer: foo ----------
+</pre>
+
+<pre class="example">(forward-sexp 3)
+ ⇒ nil
+
+---------- Buffer: foo ----------
+(concat "foo " (car x) y∗ z)
+---------- Buffer: foo ----------
+</pre>
+</div> </dd>
+</dl> <dl> <dt id="backward-sexp">Command: <strong>backward-sexp</strong> <em>&amp;optional arg</em>
+</dt> <dd><p>This function moves backward across <var>arg</var> (default 1) balanced expressions. </p></dd>
+</dl> <dl> <dt id="beginning-of-defun">Command: <strong>beginning-of-defun</strong> <em>&amp;optional arg</em>
+</dt> <dd><p>This function moves back to the <var>arg</var>th beginning of a defun. If <var>arg</var> is negative, this actually moves forward, but it still moves to the beginning of a defun, not to the end of one. <var>arg</var> defaults to 1. </p></dd>
+</dl> <dl> <dt id="end-of-defun">Command: <strong>end-of-defun</strong> <em>&amp;optional arg</em>
+</dt> <dd><p>This function moves forward to the <var>arg</var>th end of a defun. If <var>arg</var> is negative, this actually moves backward, but it still moves to the end of a defun, not to the beginning of one. <var>arg</var> defaults to 1. </p></dd>
+</dl> <dl> <dt id="defun-prompt-regexp">User Option: <strong>defun-prompt-regexp</strong>
+</dt> <dd><p>If non-<code>nil</code>, this buffer-local variable holds a regular expression that specifies what text can appear before the open-parenthesis that starts a defun. That is to say, a defun begins on a line that starts with a match for this regular expression, followed by a character with open-parenthesis syntax. </p></dd>
+</dl> <dl> <dt id="open-paren-in-column-0-is-defun-start">User Option: <strong>open-paren-in-column-0-is-defun-start</strong>
+</dt> <dd><p>If this variable’s value is non-<code>nil</code>, an open parenthesis in column 0 is considered to be the start of a defun. If it is <code>nil</code>, an open parenthesis in column 0 has no special meaning. The default is <code>t</code>. If a string literal happens to have a parenthesis in column 0, escape it with a backslash to avoid a false positive. </p></dd>
+</dl> <dl> <dt id="beginning-of-defun-function">Variable: <strong>beginning-of-defun-function</strong>
+</dt> <dd><p>If non-<code>nil</code>, this variable holds a function for finding the beginning of a defun. The function <code>beginning-of-defun</code> calls this function instead of using its normal method, passing it its optional argument. If the argument is non-<code>nil</code>, the function should move back by that many functions, like <code>beginning-of-defun</code> does. </p></dd>
+</dl> <dl> <dt id="end-of-defun-function">Variable: <strong>end-of-defun-function</strong>
+</dt> <dd><p>If non-<code>nil</code>, this variable holds a function for finding the end of a defun. The function <code>end-of-defun</code> calls this function instead of using its normal method. </p></dd>
+</dl><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 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/List-Motion.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/List-Motion.html</a>
+ </p>
+</div>