emacs-devel
[Top][All Lists]

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: Wed, 17 Aug 2011 08:57:49 +0900

```In article <address@hidden>, Eli Zaretskii <address@hidden> writes:

> > > > (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.

> Would it be a good idea to add such categories to the standard
> category table?  IOW, why do we need a special category table to
> search for these characters?

We can define at most 95 categories in one table, and, in
the standard category table, we already defined 41
categories.

For bidi, we need at least 18 categories (there are 18 bidi
classes) and a few more for combinations.  Adding all of
them to the standard category table makes the remaining
category space less than half of the whole space.  So, I
think we should be careful.