unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 30815@debbugs.gnu.org, aaronjensen@gmail.com
Subject: bug#30815: 26.0.91; unicode right single quote mark with syntax entry of w not respected by forward-word
Date: Wed, 14 Mar 2018 19:19:22 -0400	[thread overview]
Message-ID: <87lgeuw8hx.fsf@gmail.com> (raw)
In-Reply-To: <83a7vasl56.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 14 Mar 2018 17:59:49 +0200")

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

> I think we should at least mention char-script-table before sending
> the reader to the manual.  Currently we mention the syntax table, but
> keep complete silence regarding the script differences.

But if we give away everything in the doc string, nobody will read the
manual ;)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 3311 bytes --]

From a37a09873b962e4fc273c690b34ed9aa43d17dd6 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Tue, 13 Mar 2018 22:17:43 -0400
Subject: [PATCH] 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.
---
 doc/lispref/positions.texi |  2 +-
 lisp/simple.el             | 12 +++++++-----
 src/syntax.c               |  9 +++++----
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 0a03e246c0..fdc8bb96ae 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -210,7 +210,7 @@ Word Motion
 modes can override that by setting up a suitable
 @code{find-word-boundary-function-table}, described below.  Characters
 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
 move point past the boundary of the accessible portion of the buffer,
 or across a field boundary (@pxref{Fields}).  The most common case of
diff --git a/lisp/simple.el b/lisp/simple.el
index b7ad6ebd79..d8abeb3000 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7027,11 +7027,13 @@ backward-word
 With argument ARG, do this that many times.
 If ARG is omitted or nil, move point backward one word.
 
-The word boundaries are normally determined by the buffer's syntax
-table, but `find-word-boundary-function-table', such as set up
-by `subword-mode', can change that.  If a Lisp program needs to
-move by words determined strictly by the syntax table, it should
-use `backward-word-strictly' instead."
+The word boundaries are normally determined by the buffer's
+syntax table and character script (according to
+`char-script-table'), but `find-word-boundary-function-table',
+such as set up by `subword-mode', can change that.  If a Lisp
+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")
   (forward-word (- (or arg 1))))
 
diff --git a/src/syntax.c b/src/syntax.c
index 378064611c..e54325589f 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1552,10 +1552,11 @@ DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p",
 noticed if `inhibit-field-text-motion' is non-nil.
 
 The word boundaries are normally determined by the buffer's syntax
-table, but `find-word-boundary-function-table', such as set up
-by `subword-mode', can change that.  If a Lisp program needs to
-move by words determined strictly by the syntax table, it should
-use `forward-word-strictly' instead.  */)
+table and character script (according to `char-script-table'), but
+`find-word-boundary-function-table', such as set up by `subword-mode',
+can change that.  If a Lisp program needs to move by words determined
+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 tmp;
-- 
2.11.0


  reply	other threads:[~2018-03-14 23:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14  0:14 bug#30815: 26.0.91; unicode right single quote mark with syntax entry of w not respected by forward-word Aaron Jensen
2018-03-14  1:11 ` Noam Postavsky
2018-03-14  2:07   ` Aaron Jensen
2018-03-14  2:24     ` Noam Postavsky
2018-03-14  2:43       ` Aaron Jensen
2018-03-14 16:09         ` Eli Zaretskii
2018-03-14 17:43           ` Aaron Jensen
2018-03-14 17:51             ` Eli Zaretskii
2018-03-14 15:59       ` Eli Zaretskii
2018-03-14 23:19         ` Noam Postavsky [this message]
2018-03-15  6:39           ` Eli Zaretskii
2018-03-17  0:03             ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgeuw8hx.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=30815@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).