aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2018-03-13 22:17:43 -0400
committerNoam Postavsky2018-03-16 19:51:28 -0400
commit10bd3b3af8acfc226acadc654298865cffc19cc9 (patch)
tree7ef51cc5e2e671b415984365c9cfa93d374d72da
parent2b8507fbdce8228ccdbcbc31fe545a50330ddd51 (diff)
downloademacs-10bd3b3af8acfc226acadc654298865cffc19cc9.tar.gz
emacs-10bd3b3af8acfc226acadc654298865cffc19cc9.zip
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.
-rw-r--r--doc/lispref/positions.texi2
-rw-r--r--lisp/simple.el12
-rw-r--r--src/syntax.c9
3 files changed, 13 insertions, 10 deletions
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 0a03e246c01..fdc8bb96ae9 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -210,7 +210,7 @@ by the current buffer's syntax table (@pxref{Syntax Class Table}), but
210modes can override that by setting up a suitable 210modes can override that by setting up a suitable
211@code{find-word-boundary-function-table}, described below. Characters 211@code{find-word-boundary-function-table}, described below. Characters
212that belong to different scripts (as defined by 212that belong to different scripts (as defined by
213@code{char-syntax-table}), also define a word boundary 213@code{char-script-table}), also define a word boundary
214(@pxref{Character Properties}). In any case, this function cannot 214(@pxref{Character Properties}). In any case, this function cannot
215move point past the boundary of the accessible portion of the buffer, 215move point past the boundary of the accessible portion of the buffer,
216or across a field boundary (@pxref{Fields}). The most common case of 216or across a field boundary (@pxref{Fields}). The most common case of
diff --git a/lisp/simple.el b/lisp/simple.el
index b7ad6ebd799..d8abeb30004 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7027,11 +7027,13 @@ current object."
7027With argument ARG, do this that many times. 7027With argument ARG, do this that many times.
7028If ARG is omitted or nil, move point backward one word. 7028If ARG is omitted or nil, move point backward one word.
7029 7029
7030The word boundaries are normally determined by the buffer's syntax 7030The word boundaries are normally determined by the buffer's
7031table, but `find-word-boundary-function-table', such as set up 7031syntax table and character script (according to
7032by `subword-mode', can change that. If a Lisp program needs to 7032`char-script-table'), but `find-word-boundary-function-table',
7033move by words determined strictly by the syntax table, it should 7033such as set up by `subword-mode', can change that. If a Lisp
7034use `backward-word-strictly' instead." 7034program needs to move by words determined strictly by the syntax
7035table, it should use `backward-word-strictly' instead. See Info
7036node `(elisp) Word Motion' for details."
7035 (interactive "^p") 7037 (interactive "^p")
7036 (forward-word (- (or arg 1)))) 7038 (forward-word (- (or arg 1))))
7037 7039
diff --git a/src/syntax.c b/src/syntax.c
index 378064611cc..e54325589f3 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1552,10 +1552,11 @@ left there and the function returns nil. Field boundaries are not
1552noticed if `inhibit-field-text-motion' is non-nil. 1552noticed if `inhibit-field-text-motion' is non-nil.
1553 1553
1554The word boundaries are normally determined by the buffer's syntax 1554The word boundaries are normally determined by the buffer's syntax
1555table, but `find-word-boundary-function-table', such as set up 1555table and character script (according to `char-script-table'), but
1556by `subword-mode', can change that. If a Lisp program needs to 1556`find-word-boundary-function-table', such as set up by `subword-mode',
1557move by words determined strictly by the syntax table, it should 1557can change that. If a Lisp program needs to move by words determined
1558use `forward-word-strictly' instead. */) 1558strictly by the syntax table, it should use `forward-word-strictly'
1559instead. See Info node `(elisp) Word Motion' for details. */)
1559 (Lisp_Object arg) 1560 (Lisp_Object arg)
1560{ 1561{
1561 Lisp_Object tmp; 1562 Lisp_Object tmp;