From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10494: 24.0.92; Syntax table and non-ASCII character interaction Date: Thu, 11 Aug 2016 18:24:22 +0300 Message-ID: <83h9arfhw9.fsf@gnu.org> References: <87wpjoxi5q.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1470930979 15568 195.159.176.226 (11 Aug 2016 15:56:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Aug 2016 15:56:19 +0000 (UTC) Cc: aaronecay@gmail.com, 10494@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 11 17:56:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXsL4-0003mV-HE for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 17:56:10 +0200 Original-Received: from localhost ([::1]:49327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXsL1-0003xz-Fq for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 11:56:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXrr0-000486-Im for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 11:25:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXrqw-0006j6-Bi for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 11:25:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXrqw-0006j2-8t for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 11:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bXrqw-0001ZH-4w for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 11:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Aug 2016 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10494 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 10494-submit@debbugs.gnu.org id=B10494.14709290855997 (code B ref 10494); Thu, 11 Aug 2016 15:25:02 +0000 Original-Received: (at 10494) by debbugs.gnu.org; 11 Aug 2016 15:24:45 +0000 Original-Received: from localhost ([127.0.0.1]:54173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXrqf-0001Yf-0C for submit@debbugs.gnu.org; Thu, 11 Aug 2016 11:24:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXrqc-0001YR-TI for 10494@debbugs.gnu.org; Thu, 11 Aug 2016 11:24:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXrqU-0006b7-EO for 10494@debbugs.gnu.org; Thu, 11 Aug 2016 11:24:37 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXrqU-0006au-Ao; Thu, 11 Aug 2016 11:24:34 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1691 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bXrqS-0000xC-FX; Thu, 11 Aug 2016 11:24:32 -0400 In-reply-to: <87wpjoxi5q.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122081 Archived-At: > 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 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.