GNU bug report logs - #10494
24.0.92; Syntax table and non-ASCII character interaction

Previous Next

Package: emacs;

Reported by: Aaron Ecay <aaronecay <at> gmail.com>

Date: Fri, 13 Jan 2012 08:42:01 UTC

Severity: wishlist

Tags: confirmed, notabug

Merged with 13129, 30815

Found in versions 24.0.92, 24.1, 25.1, 26.0.91

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10494 <at> debbugs.gnu.org, aaronecay <at> gmail.com
Subject: bug#10494: 24.0.92; Syntax table and non-ASCII character interaction
Date: Fri, 12 Aug 2016 18:37:56 -0400
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> 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:

[v1-0001-Document-char-script-table-s-effect-on-word-motio.patch (text/plain, inline)]
From 03dbee2bf6bae29b21ea36ff3d73bce773458f78 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> 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


This bug report was last modified 7 years and 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.