From: Kenichi Handa <handa@m17n.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: cyd@stupidchicken.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
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 [thread overview]
Message-ID: <tl7mxfdpxjg.fsf@m17n.org> (raw)
In-Reply-To: <83hb5lwzt2.fsf@gnu.org> (message from Eli Zaretskii on Sat, 13 Aug 2011 10:11:53 +0300)
In article <83hb5lwzt2.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> > From: Kenichi Handa <handa@m17n.org>
> > Cc: cyd@stupidchicken.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
> > Date: Sat, 13 Aug 2011 16:00:40 +0900
> >
> > ;; For string...
> > (defun check-special-bidi-character (str)
> > (with-category-table special-category-table-for-bidi
> > (string-match "\\cr" str)))
> >
> > (check-special-bidi-character "abc") => nil
> > (check-special-bidi-character "abc א") => 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 `א' has two categories ?R and ?r, which means
(with-category-table special-category-table-for-bidi
(cons (string-match "\\cR" "א") (string-match "\\cr" "א")))
=> (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
next prev parent reply other threads:[~2011-08-13 7:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1QrEHF-0003qX-I0@vcs.savannah.gnu.org>
2011-08-11 2:14 ` [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs Stefan Monnier
2011-08-11 3:02 ` Eli Zaretskii
2011-08-11 4:48 ` Eli Zaretskii
2011-08-11 19:01 ` Chong Yidong
2011-08-12 7:21 ` Eli Zaretskii
2011-08-12 15:47 ` Chong Yidong
2011-08-12 15:54 ` Eli Zaretskii
2011-08-12 16:00 ` Chong Yidong
2011-08-12 17:25 ` Eli Zaretskii
2011-08-13 7:00 ` Kenichi Handa
2011-08-13 7:11 ` Eli Zaretskii
2011-08-13 7:42 ` Kenichi Handa [this message]
2011-08-13 13:53 ` Stefan Monnier
2011-08-14 16:21 ` Chong Yidong
2011-08-16 7:44 ` Eli Zaretskii
2011-08-16 23:57 ` Kenichi Handa
2011-08-17 5:49 ` Eli Zaretskii
2011-08-17 7:21 ` Kenichi Handa
2011-08-17 9:15 ` Eli Zaretskii
2011-08-18 2:13 ` Kenichi Handa
2011-08-17 21:12 ` Chong Yidong
2011-08-18 7:09 ` Eli Zaretskii
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=tl7mxfdpxjg.fsf@m17n.org \
--to=handa@m17n.org \
--cc=cyd@stupidchicken.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.