diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-11-20 10:30:38 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-11-20 10:30:38 +0200 |
commit | 657947dc7cf01a13a4fa260691a6fa0147107950 (patch) | |
tree | a24fb791d953b91a70b0f562d4702687d8724490 /doc/lispref | |
parent | 4fa13b2d838e11cbe3b713f3172721cb61d499f3 (diff) | |
download | emacs-657947dc7cf01a13a4fa260691a6fa0147107950.tar.gz emacs-657947dc7cf01a13a4fa260691a6fa0147107950.tar.bz2 emacs-657947dc7cf01a13a4fa260691a6fa0147107950.zip |
; Improve recently-modified documentation
* lisp/progmodes/python.el (python-base-mode)
(python--treesit-fontify-string):
* lisp/textmodes/css-mode.el (css-base-mode):
* lisp/treesit.el (treesit-ready-p, treesit-comment-end)
(treesit-simple-indent-presets): Fix typos and wording in doc strings.
* doc/lispref/parsing.texi (Tree-sitter major modes):
* doc/lispref/modes.texi (Parser-based Indentation): Fix wording
and add cross-references.
Diffstat (limited to 'doc/lispref')
-rw-r--r-- | doc/lispref/modes.texi | 26 | ||||
-rw-r--r-- | doc/lispref/parsing.texi | 2 |
2 files changed, 15 insertions, 13 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 5e5eb458974..543fc48dd7a 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -4965,10 +4965,11 @@ first child where parent is @code{argument_list}, use @end example @item comment-end -This matcher is a function of 3 arguments: @var{node}, @var{parent}, -and @var{bol}, and returns non-@code{nil} if point is before a comment -ending token. Comment ending tokens are defined by regular expression -@code{treesit-comment-end}. +This matcher is a function that is called with 3 arguments: +@var{node}, @var{parent}, and @var{bol}, and returns non-@code{nil} if +point is before a comment ending token. Comment ending tokens are +defined by regular expression @code{treesit-comment-end} +(@pxref{Tree-sitter major modes, treesit-comment-end}). @item first-sibling This anchor is a function that is called with 3 arguments: @var{node}, @@ -4999,22 +5000,23 @@ This anchor is a function that is called with 3 arguments: @var{node}, charater on the previous line. @item point-min -This anchor is a function is called with 3 arguments: @var{node}, +This anchor is a function that is called with 3 arguments: @var{node}, @var{parent}, and @var{bol}, and returns the beginning of the buffer. This is useful as the beginning of the buffer is always at column 0. @item comment-start -This anchor is a function is called with 3 arguments: @var{node}, +This anchor is a function that is called with 3 arguments: @var{node}, @var{parent}, and @var{bol}, and returns the position right after the -opening comment token. Opening comment tokens are defined by regular -expression @code{treesit-comment-start}. This function assumes -@var{parent} is the comment node. +comment-start token. Comment-start tokens are defined by regular +expression @code{treesit-comment-start} (@pxref{Tree-sitter major +modes, treesit-comment-start}). This function assumes @var{parent} is +the comment node. @item coment-start-skip -This anchor is a function is called with 3 arguments: @var{node}, +This anchor is a function that is called with 3 arguments: @var{node}, @var{parent}, and @var{bol}, and returns the position after the -opening comment token, after skipping forward any whitespace -characters. Opening comment tokens are defined by regular expression +comment-start token and any whitespace characters following that +token. Comment-start tokens are defined by regular expression @code{treesit-comment-start}. This function assumes @var{parent} is the comment node. @end ftable diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi index bea358f2b0c..f21d94ec8b3 100644 --- a/doc/lispref/parsing.texi +++ b/doc/lispref/parsing.texi @@ -1735,7 +1735,7 @@ For example, it should match @samp{//}, @samp{////}, @samp{/*}, @end defvar @defvar treesit-comment-end -This should be a regular expression matching an closing comment token. +This should be a regular expression matching a closing comment token. For example, it should match @samp{*/}, @samp{****/}, etc., in C. @end defvar |