From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs. Date: Sat, 13 Aug 2011 16:42:43 +0900 Message-ID: References: <83hb5lwzt2.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1313221379 7458 80.91.229.12 (13 Aug 2011 07:42:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 13 Aug 2011 07:42:59 +0000 (UTC) Cc: cyd@stupidchicken.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 13 09:42:55 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qs8ru-0006LM-Ri for ged-emacs-devel@m.gmane.org; Sat, 13 Aug 2011 09:42:54 +0200 Original-Received: from localhost ([::1]:39850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qs8ru-0000Yl-2P for ged-emacs-devel@m.gmane.org; Sat, 13 Aug 2011 03:42:54 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qs8rq-0000YU-No for emacs-devel@gnu.org; Sat, 13 Aug 2011 03:42:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qs8rp-0001Tg-0z for emacs-devel@gnu.org; Sat, 13 Aug 2011 03:42:50 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:34176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qs8ro-0001TV-GK; Sat, 13 Aug 2011 03:42:48 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id p7D7gh60009810; Sat, 13 Aug 2011 16:42:43 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id p7D7ghB4025511; Sat, 13 Aug 2011 16:42:43 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id p7D7gh33027225; Sat, 13 Aug 2011 16:42:43 +0900 (JST) env-from (handa@m17n.org) In-Reply-To: <83hb5lwzt2.fsf@gnu.org> (message from Eli Zaretskii on Sat, 13 Aug 2011 10:11:53 +0300) X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-Received-From: 150.29.246.133 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143190 Archived-At: In article <83hb5lwzt2.fsf@gnu.org>, Eli Zaretskii writes: > > From: Kenichi Handa > > Cc: cyd@stupidchicken.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org > > Date: Sat, 13 Aug 2011 16:00:40 +0900 > >=20 > > ;; For string... > > (defun check-special-bidi-character (str) > > (with-category-table special-category-table-for-bidi > > (string-match "\\cr" str))) > >=20 > > (check-special-bidi-character "abc") =3D> nil > > (check-special-bidi-character "abc =D7=90")=E2=80=8E =3D> 4 > Thanks! I think we should have a few of such category-tables in Emacs > by default. As categories are not exclusive (i.e. one character can have multiple categories), I think you need just one category-table. In which, each character has a category uniquely corresponding to a bidi class (L, AL, etc), in addition, all some character has a category whose meaning is, for instance (one of R, AL, or RLO). For instance, if you define a cateogry ?R as bidi class R, and define a category ?r as one of (R, AL, or RLO), the character `=D7=90' has two categories ?R and ?r, which means (with-category-table special-category-table-for-bidi (cons (string-match "\\cR" "=D7=90") (string-match "\\cr" "=D7=90"))) =3D> (0 . 0) As we can define 95 different categories in a single category table, I think the number of categories are sufficient. --- Kenichi Handa handa@m17n.org