all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: npostavs@users.sourceforge.net
Cc: aaronecay@gmail.com, 10494@debbugs.gnu.org
Subject: bug#10494: 24.0.92; Syntax table and non-ASCII character interaction
Date: Thu, 11 Aug 2016 18:24:22 +0300	[thread overview]
Message-ID: <83h9arfhw9.fsf@gnu.org> (raw)
In-Reply-To: <87wpjoxi5q.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net)

> From: npostavs@users.sourceforge.net
> Date: Wed, 10 Aug 2016 20:29:05 -0400
> Cc: 10494@debbugs.gnu.org
> 
> I confirm this is still the case in 25.1-rc1.
> 
> Aaron Ecay <aaronecay@gmail.com> writes:
> >
> > This bug relates to setting a non-ASCII character punctuation character
> > (U+2019, which is ’) to have word syntax, and using word-motion
> > commands.  Here’s a recipe from emacs -Q:
> >
> > M-x text-mode
> > don't
> > C-a M-f
> >   -> (as expected, the cursor moves to the end of the line)
> > RET RET
> > don M-x ucs-insert 2019 t
> 
> This should now use insert-char (C-x 8 RET) instead of ucs-insert.
> 
> >   -> (text in buffer: "don’t")
> > C-a M-f
> >   -> (cursor is on the quotation mark, as expected)
> > M-: (modify-syntax-entry ?’ "w" text-mode-syntax-table)
> > C-a M-f
> >   -> (BUG: cursor is on quotation mark, which should count as part of the word)
> >
> > If you re-run the experiment substituting - for ’ everywhere, there is a
> > difference in behavior – the cursor moves to the end of the line after
> > the call to modify-syntax-entry, as expected.  This leads me to think
> > that the problem has to do with ’ being outside the ASCII charset.

Indeed.  This is a feature: we don't let word-movement commands to
cross into a different script.  IOW, if

  (aref char-script-table C1)

and

  (aref char-script-table C2)

return different values, then we decide that there's a word boundary
between C1 and C2.  See the function word_boundary_p, which is called
from scan_words.

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





  reply	other threads:[~2016-08-11 15:24 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 [this message]
2016-08-12 22:37     ` npostavs
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

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

  git send-email \
    --in-reply-to=83h9arfhw9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=10494@debbugs.gnu.org \
    --cc=aaronecay@gmail.com \
    --cc=npostavs@users.sourceforge.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.