emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bar cursor in bidirectional text


From: Eli Zaretskii
Subject: Re: Bar cursor in bidirectional text
Date: Sat, 28 Aug 2010 23:13:15 +0300

> Date: Sat, 28 Aug 2010 20:23:24 +0200
> From: Jan Djärv <address@hidden>
> CC: address@hidden
> 
> 2010-08-18 21:30, Eli Zaretskii skrev:
> > I committed today revno 101130 (fixed later in revno 101131) that
> > causes the bar cursor to be positioned correctly on right-to-left
> > characters.  I did that for X and w32, but not for NS, since the
> > relevant code in nsterm.m is slightly different and uses APIs whose
> > semantics I don't understand well enough.
> >
> > Could someone who has access to NS please fix nsterm.m in the manner
> > similar to what I did for X and w32?  The changes should be in the
> > ns_draw_window_cursor function and affect the code under `case BAR_CURSOR'.
> >
> 
> How do I test the changes?

 emacs -Q
 C-h H
 M-: (setq cursor-type 'bar) RET

Now move to one of the lines that use R2L scripts, e.g. Arabic or
Hebrew, and use C-f to get to the Arabic or Hebrew letters.  You
should see the cursor positioned to the right of each R2L letter, as
opposed to the left in L2R scripts.  To make sure the cursor is indeed
to the right of a letter, you could use "C-x =" to show the character
at point.

(Actually, the cursor is positioned to the right of every character
that has its level resolved as R2L.  For example, you can see the
cursor positioned to the right of each of the two parentheses
enclosing the name of the Hebrew language in Hebrew: that is because
they are neutral characters that take the directionality of the
surrounding text, according to the Unicode Bidirectional Algorithm
that Emacs implements.)

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]