From: Eli Zaretskii Date: Sat, 17 Jun 2023 09:02:55 +0000 (-0400) Subject: Merge from origin/emacs-29 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d1ddd1d5d9c0b14dff35e7589368dbe8c30549e3;p=emacs.git Merge from origin/emacs-29 84d2da003e1 ; Fix example in the Flymake manual 0a1459f1d9b * doc/misc/calc.texi (Advanced Math Functions): Correct c... 92faf1f5645 Consider 'dired-kill-when-opening-new-dired-buffer' in mo... bafe71a69fc ; Fix use-package.texi markup 018e4ca6c5d ; * doc/misc/calc.texi (Advanced Math Functions): Fix las... 1952dbd4c5f Fix Gamma function definition in calc.texi f73f82d7e89 Fix subscripts in the Calc manual 70fc7c41ef3 Improve documentation of 'declare' forms c8357582389 ; * src/lread.c (bytecode_from_rev_list): Avoid C++ comment. 28478574961 Improve tree-sitter docs 0e9307eb2b8 Fix some Texinfo markup in manuals 8dc08333eea Fix bol/bos anchors in tree-sitter :match regexps 8225ade6151 ; * src/xdisp.c (syms_of_xdisp) : F... 1f0527a312a ; Fix last change in tex-mode.el 4da479920e6 * lisp/subr.el (with-restriction): Tweak indent rule 36aa9bd8183 ; Fix previous change aaeaf608d89 Fix setting region in the minibuffer 1383efe01d0 Fix setting $DBUS_SESSION_BUS_ADDRESS after Emacs has sta... bdb0bc2b4e4 Fix tex-mode display-buffer issues 90047c38ce9 Add test for when 'completion-auto-help' is 'visible' 2c623e4feb9 Avoid errors in 'apropos-documentation' after 'eval-buffer' dd3b98121cc ; * doc/emacs/indent.texi (Indentation Commands): Fix las... 904edf1f076 Mention indent-rigidly in the Emacs manual --- d1ddd1d5d9c0b14dff35e7589368dbe8c30549e3 diff --cc doc/lispref/positions.texi index 1305daa7a2e,d8115ac3ad3..a308f2dfc4e --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@@ -852,46 -859,12 +859,46 @@@ node is a valid defun, or @code{nil} i @end defvar @defvar treesit-defun-tactic - This variable determines how Emacs treats 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. + This variable determines how Emacs treats 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 +@defvar treesit-sentence-type-regexp +The value of this variable is a regexp matching the node type of sentence +nodes. (For ``node'' and ``node type'', @pxref{Parsing Program Source}.) +@end defvar + +@findex treesit-forward-sentence +@findex forward-sentence +@findex backward-sentence +If Emacs is compiled with tree-sitter, it can use the tree-sitter +parser information to move across syntax constructs. Since what +exactly is considered a sentence varies between languages, a major +mode should set @code{treesit-sentence-type-regexp} to determine that. +Then the mode can get navigation-by-sentence functionality for free, +by using @code{forward-sentence} and +@code{backward-sentence}(@pxref{Moving by Sentences,,, emacs, The +extensible self-documenting text editor}). + +@defvar treesit-sexp-type-regexp +The value of this variable is a regexp matching the node type of sexp +nodes. (For ``node'' and ``node type'', @pxref{Parsing Program +Source}.) +@end defvar + +@findex treesit-forward-sexp +@findex forward-sexp@r{, and tree-sitter} +@findex backward-sexp@r{, and tree-sitter} +If Emacs is compiled with tree-sitter, it can use the tree-sitter +parser information to move across syntax constructs. Since what +exactly is considered a sexp varies between languages, a major mode +should set @code{treesit-sexp-type-regexp} to determine that. Then +the mode can get navigation-by-sexp functionality for free, by using +@code{forward-sexp} and @code{backward-sexp}(@pxref{Moving by +Sentences,,, emacs, The extensible self-documenting text editor}). + @node Skipping Characters @subsection Skipping Characters @cindex skipping characters