unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: Eli Zaretskii <eliz@gnu.org>
Cc: 10494@debbugs.gnu.org, aaronecay@gmail.com
Subject: bug#10494: 24.0.92; Syntax table and non-ASCII character interaction
Date: Fri, 12 Aug 2016 18:37:56 -0400	[thread overview]
Message-ID: <87h9apy5ob.fsf@users.sourceforge.net> (raw)
In-Reply-To: <83h9arfhw9.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 11 Aug 2016 18:24:22 +0300")

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

Eli Zaretskii <eliz@gnu.org> writes:

> Indeed.  This is a feature:

Ah, so doing

    (modify-syntax-entry ?’ "w" text-mode-syntax-table)
    (aset char-script-table ?’ 'latin)

does let word motion skip over ’ as OP wanted.

>
> Maybe we should document this somewhere, like the ELisp manual.

`(elisp) Word Motion' looks like a good place for it:


[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2177 bytes --]

From 03dbee2bf6bae29b21ea36ff3d73bce773458f78 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Fri, 12 Aug 2016 18:33:17 -0400
Subject: [PATCH v1] Document char-script-table's effect on word motion

* doc/lispref/positions.texi (Word Motion): Talk about
char-script-table (Bug #10494).
---
 doc/lispref/positions.texi | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 1d748b8..3359ced 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -192,8 +192,8 @@ Word Motion
 @subsection Motion by Words
 
   The functions for parsing words described below use the syntax table
-to decide whether a given character is part of a word.  @xref{Syntax
-Tables}.
+and @code{char-script-table} to decide whether a given character is
+part of a word.  @xref{Syntax Tables} and @xref{Character Properties}.
 
 @deffn Command forward-word &optional count
 This function moves point forward @var{count} words (or backward if
@@ -207,11 +207,13 @@ Word Motion
 that begin and end words, known as @dfn{word boundaries}, are defined
 by the current buffer's syntax table (@pxref{Syntax Class Table}), but
 modes can override that by setting up a suitable
-@code{find-word-boundary-function-table}, described below.  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 a field boundary is the end
-of the prompt in the minibuffer.
+@code{find-word-boundary-function-table}, described below.  Characters
+that belong to a different script (as defined by
+@code{char-syntax-table}), also mark 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 a field boundary
+is the end of the prompt in the minibuffer.
 
 If it is possible to move @var{count} words, without being stopped
 prematurely by the buffer boundary or a field boundary, the value is
-- 
2.9.2


  reply	other threads:[~2016-08-12 22:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13  8:40 bug#10494: 24.0.92; Syntax table and non-ASCII character interaction Aaron Ecay
2012-01-13 10:45 ` Andreas Schwab
2012-01-13 17:04   ` Aaron Ecay
2016-08-11  0:29 ` npostavs
2016-08-11 15:24   ` Eli Zaretskii
2016-08-12 22:37     ` npostavs [this message]
2016-08-13  6:56       ` Eli Zaretskii
2016-08-13 13:21         ` npostavs
2016-08-13 13:33           ` Eli Zaretskii
2016-08-13 14:19             ` npostavs
2016-08-13 14:31               ` Eli Zaretskii
2016-08-13 14:55                 ` Eli Zaretskii
2016-08-13 18:14                 ` npostavs
2016-08-13 18:35                   ` Eli Zaretskii
2016-08-13 21:42                     ` npostavs
2016-08-14  2:32                       ` Eli Zaretskii
2016-08-14  2:58                         ` npostavs

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=87h9apy5ob.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=10494@debbugs.gnu.org \
    --cc=aaronecay@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).