; Fix documentation of last change

* etc/NEWS:
* doc/emacs/programs.texi (Moving by Sentences): Minor wording fixes.
This commit is contained in:
Eli Zaretskii 2023-01-11 19:15:30 +02:00
parent 37d9397578
commit c51bfef34a
2 changed files with 17 additions and 12 deletions

View file

@ -266,24 +266,29 @@ commands to move over certain constructs in programming languages
(@pxref{Sentences}, @pxref{Moving by Defuns}). In a programming
language a sentence is usually a complete language construct smaller
than defuns, but larger than sexps (@pxref{List Motion,,, elisp, The
Emacs Lisp Reference Manual}). What exactly a sentence is in a
non-human language is dependent on the target language, but usually it
is complete statements, such as a variable definition and
initialization, or a conditional statement. An example of a sentence
in the C language could be
Emacs Lisp Reference Manual}). What exactly is a sentence in this
case depends on the programming language, but usually it is a complete
statement, such as a variable definition and initialization, or a
conditional statement. An example of a sentence in the C language
could be
@example
int x = 5;
@end example
@noindent
or in the JavaScript language it could look like
@example
@group
const thing = () => console.log("Hi");
@end group
@group
const foo = [1] == '1'
? "No way"
: "...";
@end group
@end example
@table @kbd
@ -308,7 +313,7 @@ sentence in the direction of motion.
@kbd{M-a} with a negative argument @minus{}@var{n} moves forward
@var{n} times to the next end of a sentence. Likewise, @kbd{M-e} with
a negative argument moves back to a start of a sentence.
a negative argument moves back to the start of a sentence.
@node Imenu
@subsection Imenu

View file

@ -69,8 +69,8 @@ Tree-sitter modes. This functionality utilizes the new
** Commands and variables to move by program statements
*** New variable 'forward-sentence-function'.
Major modes now can set this variable to customize the behavior of the
'forward-sentence' function.
Major modes can now set this variable to customize the behavior of the
'forward-sentence' command.
*** New function 'forward-sentence-default-function'.
The previous implementation of 'forward-sentence' is moved into its
@ -78,11 +78,11 @@ own function, to be bound by 'forward-sentence-function'.
*** New defvar-local 'treesit-sentence-type-regexp.
Similarly to 'treesit-defun-type-regexp', this variable is used to
navigate sentences in Tree-sitter enabled modes.
define "sentences" in Tree-sitter enabled modes.
*** New function 'treesit-forward-sentence'.
treesit.el now conditionally sets 'forward-sentence-function' for all
Tree-sitter modes that sets 'treesit-sentence-type-regexp'.
All tree-sitter modes that define 'treesit-sentence-type-regexp' now
set 'forward-sentence-function' to call 'treesit-forward-sentence'.
* Changes in Specialized Modes and Packages in Emacs 30.1