From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#10494: 24.0.92; Syntax table and non-ASCII character interaction Date: Sat, 13 Aug 2016 09:21:54 -0400 Message-ID: <87lh00x0r1.fsf@users.sourceforge.net> References: <87wpjoxi5q.fsf@users.sourceforge.net> <83h9arfhw9.fsf@gnu.org> <87h9apy5ob.fsf@users.sourceforge.net> <83eg5tdume.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1471094543 31993 195.159.176.226 (13 Aug 2016 13:22:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 13 Aug 2016 13:22:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 10494@debbugs.gnu.org, aaronecay@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 13 15:22:19 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 1bYYtG-000869-2D for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Aug 2016 15:22:18 +0200 Original-Received: from localhost ([::1]:57307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYYtB-000431-Sv for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Aug 2016 09:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYYt6-00042u-5k for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2016 09:22:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYYt0-0000hi-5L for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2016 09:22:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYYt0-0000he-1Q for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2016 09:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bYYsz-0002mL-To for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2016 09:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Aug 2016 13:22:01 +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.147109451310667 (code B ref 10494); Sat, 13 Aug 2016 13:22:01 +0000 Original-Received: (at 10494) by debbugs.gnu.org; 13 Aug 2016 13:21:53 +0000 Original-Received: from localhost ([127.0.0.1]:55816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYYsr-0002lz-7S for submit@debbugs.gnu.org; Sat, 13 Aug 2016 09:21:53 -0400 Original-Received: from mail-io0-f169.google.com ([209.85.223.169]:34803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYYsp-0002li-DO for 10494@debbugs.gnu.org; Sat, 13 Aug 2016 09:21:51 -0400 Original-Received: by mail-io0-f169.google.com with SMTP id q83so47385058iod.1 for <10494@debbugs.gnu.org>; Sat, 13 Aug 2016 06:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=gkWe0yjXHNmEf4tnBO94S/8ZveYNUETXZY75qzzJIeM=; b=ZRck9q0lpaXrEpRP1zZP9nJAWrTaYTpBp5BhTG43mAUng2AzmxnE8KRFS+X7OZxa4z tc9GHAsBD2z+jhnfrooapTdJtu9CtItGPub91pR7MJJyo9rr65JEFh48VvpujkWUkSya 1y6CHYkVyQIXiwRCLryRhyuGGiIMs5A9HSJyoT4Ro/29bxU6hMcJR0JkafpRRpymEFPu /rKApxsYm8AmZeBhpA9+JstqHjcYcCuzdnhDFTMqO4pryGxvSJzbnTNpYnvUUCzNzz6A E0JNTgpu4Oug1tb9F9Fqy4yA+BQXS+UxaXxBeOoulKx014z9aZBYvdNL9bwwLbaZUpTT jPOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=gkWe0yjXHNmEf4tnBO94S/8ZveYNUETXZY75qzzJIeM=; b=SQqGaiTv7Aq1Wdv+jnfl4CYS+GyEVcpmMtMsZgFGRTnK40btkuRFcs/wHD5g5JW+dS EoFkoEvdUxIaJXqL6fmbHvA2AK0cddotdc0jbONi3fiii+JLVwI4wOLVwGNmP4Lmlupr n7YMj/eWwwYeOdd0KcwfE+1yQlj2cQbG9QR+FuXGKuFg7DvOhzBzGWlEuhBWa3kE26k5 FocQpEL5TtqOo+jrmk3uIFII40zUFgw7FLVtj+Fz0OHVzrgiRdMDifFVJOBI+Z73RMSL +IPiU59QrJOSYbKEpxT73yVWylCxW+0rVVMloDcaJ7/B9yu/v6bLQd76dhtj6V4+YY6x 4u0A== X-Gm-Message-State: AEkooutP8tlwbq2rhYCB8EV0HIumhI827/+Fxn8aNA0G1zutq/8rFhPGN6IRi7Pjx2IKAw== X-Received: by 10.107.130.39 with SMTP id e39mr23146772iod.66.1471094505925; Sat, 13 Aug 2016 06:21:45 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id i80sm3134605ita.5.2016.08.13.06.21.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 13 Aug 2016 06:21:44 -0700 (PDT) In-Reply-To: <83eg5tdume.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Aug 2016 09:56:57 +0300") 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:122168 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: npostavs@users.sourceforge.net >> Cc: 10494@debbugs.gnu.org, aaronecay@gmail.com >> Date: Fri, 12 Aug 2016 18:37:56 -0400 >>=20 >> Eli Zaretskii writes: >>=20 >> > Indeed. This is a feature: >>=20 >> Ah, so doing >>=20 >> (modify-syntax-entry ?=E2=80=99 "w" text-mode-syntax-table) >> (aset char-script-table ?=E2=80=99 'latin) >>=20 >> does let word motion skip over =E2=80=99 as OP wanted. > > Yes. But I don't recommend such a "solution", because that would most > probably bite elsewhere, when we do want that character behave as a > symbol. Sure, but it could be made local to text-mode: (modify-syntax-entry ?=E2=80=99 "w" text-mode-syntax-table) (defconst my-text-char-script-table (let ((table (copy-sequence char-script-table))) (aset table ?=E2=80=99 'latin) table)) (defun my-text-mode-hook () (set (make-local-variable 'char-script-table) my-text-char-script-table)) (add-hook 'text-mode-hook 'my-text-mode-hook) > >> `(elisp) Word Motion' looks like a good place for it: > > Right, thanks. > >> 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}. > > @xref generates a capitalized "See", so is inappropriate in the middle > of a sentence. Please use "see @ref" instead. Uff, I find these multiple variants of reference very confusing, I also got a complaint from makeinfo that I was missing punctuation after the first @xref. Does it look okay now? (I made the other wording fixes too) --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=v2-0001-Document-char-script-table-s-effect-on-word-motio.patch Content-Description: patch v2 >From e18a6dc7be2aa245767d00ac69a0e13605fc4440 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 12 Aug 2016 18:33:17 -0400 Subject: [PATCH v2] 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 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 1d748b8..b6133dc 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -192,8 +192,9 @@ 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 see @ref{Character +Properties}. @deffn Command forward-word &optional count This function moves point forward @var{count} words (or backward if @@ -207,11 +208,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 different scripts (as defined by +@code{char-syntax-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 +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 --=-=-=--