emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 aef869e74f 2/5: ; Update tree-sitter manual


From: Yuan Fu
Subject: emacs-29 aef869e74f 2/5: ; Update tree-sitter manual
Date: Mon, 2 Jan 2023 17:33:13 -0500 (EST)

branch: emacs-29
commit aef869e74f47bbe00c8cf0cb02cea20aa0c33a6d
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    ; Update tree-sitter manual
    
    * doc/lispref/positions.texi (List Motion): Replace
    treesit-defun-prefer-top-level with treesit-defun-tactic.
---
 doc/lispref/positions.texi | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 68e948bacd..f47720184a 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -848,25 +848,14 @@ The value of this variable is a regexp matching the node 
type of defun
 nodes.  (For ``node'' and ``node type'', @pxref{Parsing Program Source}.)
 
 For example, @code{python-mode} sets this variable to a regexp that
-matches either @code{function_definition} or @code{class_definition}.
+matches either @code{"function_definition"} or @code{"class_definition"}.
 @end defvar
 
-@defvar treesit-defun-prefer-top-level
-If this variable is non-@code{nil}, Emacs skips nested defuns, when it
-looks for beginning and end of a defun, and prefers to go to the
-top-level defun instead.
-
-In some languages, a defun could be nested in another one.  By default,
-Emacs stops at the first defun it encounters.  But if this variable's
-value is @code{t}, whenever Emacs finds a defun node, it tries to go
-up the parse tree until it finds the top-level defun.
-
-This variable can also be a list of cons cells of the form
-@w{@code{(@var{from} . @var{to}))}}, where @var{from} and @var{to} are
-regexps matching tree-sitter node types.  When Emacs finds a defun
-node whose type matches any of the @var{from} regexps in the list, it
-then tries to go up the parse tree until it finds a higher-level node
-matching the corresponding @var{to} regexp.
+@defvar treesit-defun-tactic
+This variable determines how does Emacs treat nested defuns.  If the
+value is @code{top-level}, navigation functions only move across
+top-level defuns, if the value is @code{nested}, navigation functions
+recognize nested defuns.
 @end defvar
 
 @node Skipping Characters



reply via email to

[Prev in Thread] Current Thread [Next in Thread]