[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mar
From: |
Kenichi Handa |
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 |
In article <address@hidden>, Eli Zaretskii <address@hidden> writes:
> > From: Kenichi Handa <address@hidden>
> > Cc: address@hidden, address@hidden, address@hidden
> > 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
address@hidden
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., (continued)
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/10
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/11
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Chong Yidong, 2011/08/11
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/12
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Chong Yidong, 2011/08/12
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/12
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Chong Yidong, 2011/08/12
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/12
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Kenichi Handa, 2011/08/13
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/13
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs.,
Kenichi Handa <=
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Stefan Monnier, 2011/08/13
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Chong Yidong, 2011/08/14
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/16
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Kenichi Handa, 2011/08/16
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/17
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Kenichi Handa, 2011/08/17
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/17
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Kenichi Handa, 2011/08/17
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Chong Yidong, 2011/08/17
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r105429: New function `string-mark-left-to-right' for handling LRMs., Eli Zaretskii, 2011/08/18