emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105452: Support RLE/RLO/LRE/LRO for


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105452: Support RLE/RLO/LRE/LRO for determining paragraph direction.
Date: Mon, 15 Aug 2011 11:16:09 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105452
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2011-08-15 11:16:09 +0300
message:
  Support RLE/RLO/LRE/LRO for determining paragraph direction.
  
   src/bidi.c (bidi_paragraph_init): Support zero value of
   bidi_ignore_explicit_marks_for_paragraph_level.
modified:
  src/ChangeLog
  src/bidi.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-08-15 06:44:48 +0000
+++ b/src/ChangeLog     2011-08-15 08:16:09 +0000
@@ -1,5 +1,8 @@
 2011-08-15  Eli Zaretskii  <address@hidden>
 
+       * bidi.c (bidi_paragraph_init): Support zero value of
+       bidi_ignore_explicit_marks_for_paragraph_level.
+
        * xdisp.c (move_it_in_display_line_to): Don't reset pixel
        coordinates of the iterator when restoring from ppos_it.
        (Bug#9296)

=== modified file 'src/bidi.c'
--- a/src/bidi.c        2011-08-06 15:03:25 +0000
+++ b/src/bidi.c        2011-08-15 08:16:09 +0000
@@ -79,6 +79,11 @@
   STRONG
 } bidi_category_t;
 
+/* UAX#9 says to search only for L, AL, or R types of characters, and
+   ignore RLE, RLO, LRE, and LRO, when determining the base paragraph
+   level.  Yudit indeed ignores them.  This variable is therefore set
+   by default to ignore them, but setting it to zero will take them
+   into account.  */
 extern int bidi_ignore_explicit_marks_for_paragraph_level EXTERNALLY_VISIBLE;
 int bidi_ignore_explicit_marks_for_paragraph_level = 1;
 
@@ -1178,10 +1183,6 @@
        type = bidi_get_type (ch, NEUTRAL_DIR);
 
        for (pos += nchars, bytepos += ch_len;
-            /* NOTE: UAX#9 says to search only for L, AL, or R types
-               of characters, and ignore RLE, RLO, LRE, and LRO.
-               However, I'm not sure it makes sense to omit those 4;
-               should try with and without that to see the effect.  */
             (bidi_get_category (type) != STRONG)
               || (bidi_ignore_explicit_marks_for_paragraph_level
                   && (type == RLE || type == RLO
@@ -1206,9 +1207,13 @@
            pos += nchars;
            bytepos += ch_len;
          }
-       if (type == STRONG_R || type == STRONG_AL) /* P3 */
+       if ((type == STRONG_R || type == STRONG_AL) /* P3 */
+           || (!bidi_ignore_explicit_marks_for_paragraph_level
+               && (type == RLO || type == RLE)))
          bidi_it->paragraph_dir = R2L;
-       else if (type == STRONG_L)
+       else if (type == STRONG_L
+                || (!bidi_ignore_explicit_marks_for_paragraph_level
+                    && (type == LRO || type == LRE)))
          bidi_it->paragraph_dir = L2R;
        if (!string_p
            && no_default_p && bidi_it->paragraph_dir == NEUTRAL_DIR)


reply via email to

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