Improve word motion docs (Bug#30815)

* doc/lispref/positions.texi (Word Motion): Fix reference to
`char-script-table'.
* lisp/simple.el (backward-word):
* src/syntax.c (forward-word): Mention `char-script-table' and add
link to the 'Word Motion' manual section.
This commit is contained in:
Noam Postavsky 2018-03-13 22:17:43 -04:00
parent 2b8507fbdc
commit 10bd3b3af8
3 changed files with 13 additions and 10 deletions

View file

@ -210,7 +210,7 @@ by the current buffer's syntax table (@pxref{Syntax Class Table}), but
modes can override that by setting up a suitable modes can override that by setting up a suitable
@code{find-word-boundary-function-table}, described below. Characters @code{find-word-boundary-function-table}, described below. Characters
that belong to different scripts (as defined by that belong to different scripts (as defined by
@code{char-syntax-table}), also define a word boundary @code{char-script-table}), also define a word boundary
(@pxref{Character Properties}). In any case, this function cannot (@pxref{Character Properties}). In any case, this function cannot
move point past the boundary of the accessible portion of the buffer, move point past the boundary of the accessible portion of the buffer,
or across a field boundary (@pxref{Fields}). The most common case of or across a field boundary (@pxref{Fields}). The most common case of

View file

@ -7027,11 +7027,13 @@ current object."
With argument ARG, do this that many times. With argument ARG, do this that many times.
If ARG is omitted or nil, move point backward one word. If ARG is omitted or nil, move point backward one word.
The word boundaries are normally determined by the buffer's syntax The word boundaries are normally determined by the buffer's
table, but `find-word-boundary-function-table', such as set up syntax table and character script (according to
by `subword-mode', can change that. If a Lisp program needs to `char-script-table'), but `find-word-boundary-function-table',
move by words determined strictly by the syntax table, it should such as set up by `subword-mode', can change that. If a Lisp
use `backward-word-strictly' instead." program needs to move by words determined strictly by the syntax
table, it should use `backward-word-strictly' instead. See Info
node `(elisp) Word Motion' for details."
(interactive "^p") (interactive "^p")
(forward-word (- (or arg 1)))) (forward-word (- (or arg 1))))

View file

@ -1552,10 +1552,11 @@ left there and the function returns nil. Field boundaries are not
noticed if `inhibit-field-text-motion' is non-nil. noticed if `inhibit-field-text-motion' is non-nil.
The word boundaries are normally determined by the buffer's syntax The word boundaries are normally determined by the buffer's syntax
table, but `find-word-boundary-function-table', such as set up table and character script (according to `char-script-table'), but
by `subword-mode', can change that. If a Lisp program needs to `find-word-boundary-function-table', such as set up by `subword-mode',
move by words determined strictly by the syntax table, it should can change that. If a Lisp program needs to move by words determined
use `forward-word-strictly' instead. */) strictly by the syntax table, it should use `forward-word-strictly'
instead. See Info node `(elisp) Word Motion' for details. */)
(Lisp_Object arg) (Lisp_Object arg)
{ {
Lisp_Object tmp; Lisp_Object tmp;