summaryrefslogtreecommitdiff
path: root/devdocs/elisp/blinking.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/blinking.html
new repository
Diffstat (limited to 'devdocs/elisp/blinking.html')
-rw-r--r--devdocs/elisp/blinking.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/devdocs/elisp/blinking.html b/devdocs/elisp/blinking.html
new file mode 100644
index 00000000..100d9f24
--- /dev/null
+++ b/devdocs/elisp/blinking.html
@@ -0,0 +1,26 @@
+ <h3 class="section">Blinking Parentheses</h3> <p>This section describes the mechanism by which Emacs shows a matching open parenthesis when the user inserts a close parenthesis. </p> <dl> <dt id="blink-paren-function">Variable: <strong>blink-paren-function</strong>
+</dt> <dd><p>The value of this variable should be a function (of no arguments) to be called whenever a character with close parenthesis syntax is inserted. The value of <code>blink-paren-function</code> may be <code>nil</code>, in which case nothing is done. </p></dd>
+</dl> <dl> <dt id="blink-matching-paren">User Option: <strong>blink-matching-paren</strong>
+</dt> <dd><p>If this variable is <code>nil</code>, then <code>blink-matching-open</code> does nothing. </p></dd>
+</dl> <dl> <dt id="blink-matching-paren-distance">User Option: <strong>blink-matching-paren-distance</strong>
+</dt> <dd><p>This variable specifies the maximum distance to scan for a matching parenthesis before giving up. </p></dd>
+</dl> <dl> <dt id="blink-matching-delay">User Option: <strong>blink-matching-delay</strong>
+</dt> <dd><p>This variable specifies the number of seconds to keep indicating the matching parenthesis. A fraction of a second often gives good results, but the default is 1, which works on all systems. </p></dd>
+</dl> <dl> <dt id="blink-matching-open">Command: <strong>blink-matching-open</strong>
+</dt> <dd>
+<p>This function is the default value of <code>blink-paren-function</code>. It assumes that point follows a character with close parenthesis syntax and applies the appropriate effect momentarily to the matching opening character. If that character is not already on the screen, it displays the character’s context in the echo area. To avoid long delays, this function does not search farther than <code>blink-matching-paren-distance</code> characters. </p> <p>Here is an example of calling this function explicitly. </p> <div class="example"> <pre class="example">(defun interactive-blink-matching-open ()
+ "Indicate momentarily the start of parenthesized sexp before point."
+ (interactive)
+</pre>
+<pre class="example"> (let ((blink-matching-paren-distance
+ (buffer-size))
+ (blink-matching-paren t))
+ (blink-matching-open)))
+</pre>
+</div> </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/Blinking.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Blinking.html</a>
+ </p>
+</div>