emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r100280: Fix comments from revno 1002


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100280: Fix comments from revno 100276.
Date: Fri, 14 May 2010 16:44:12 +0300
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100280
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2010-05-14 16:44:12 +0300
message:
  Fix comments from revno 100276.
modified:
  src/composite.c
  src/xdisp.c
=== modified file 'src/composite.c'
--- a/src/composite.c   2010-05-14 04:14:23 +0000
+++ b/src/composite.c   2010-05-14 13:44:12 +0000
@@ -1150,13 +1150,13 @@
       /* Search backward for a pattern that may be composed and the
         position of (possibly) the last character of the match is
         closest to (but not after) START.  The reason for the last
-        character is that set_iterator_to_next works in reverse order
-        and, thus we must stop at the last character for composition
+        character is that set_iterator_to_next works in reverse order,
+        and thus we must stop at the last character for composition
         check.  */
       unsigned char *p;
       int len;
-      /* limit byte position used in fast_looking_at.  This is the
-        byte position of the next character of START. */
+      /* Limit byte position used in fast_looking_at.  This is the
+        byte position of the character after START. */
       EMACS_INT limit;
 
       if (NILP (string))
@@ -1191,7 +1191,7 @@
                    len = 1;
                  if (len > 0)
                    {
-                     /* Make CPOS points the last character of match.
+                     /* Make CPOS point to the last character of match.
                         Note that LEN is byte-length.  */
                      bpos += len;
                      if (NILP (string))

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2010-05-14 04:15:58 +0000
+++ b/src/xdisp.c       2010-05-14 13:44:12 +0000
@@ -6307,29 +6307,14 @@
          else if (! it->cmp_it.reversed_p)
            {
              /* Composition created while scanning forward.  */
-             /* Update IT's char/byte positions to point the first
+             /* Update IT's char/byte positions to point to the first
                 character of the next grapheme cluster, or to the
                 character visually after the current composition.  */
-#if 0
-             /* Is it ok to do this directly? */
-             IT_CHARPOS (*it) += it->cmp_it.nchars;
-             IT_BYTEPOS (*it) += it->cmp_it.nbytes;
-#else
-             /* Or do we have to call bidi_get_next_char_visually
-                repeatedly (perhaps not to confuse some internal
-                state of bidi_it)?  At least we must do this if we
-                have consumed all grapheme clusters in the current
-                composition because the next character will be in the
-                different bidi level.  */
              for (i = 0; i < it->cmp_it.nchars; i++)
                bidi_get_next_char_visually (&it->bidi_it);
-             /* BTW, it seems that the name
-                bidi_get_next_char_visually is confusing because
-                it sounds like not advancing character position.
-                How about bidi_set_iterator_to_next? */
              IT_BYTEPOS (*it) = it->bidi_it.bytepos;
              IT_CHARPOS (*it) = it->bidi_it.charpos;
-#endif
+
              if (it->cmp_it.to < it->cmp_it.nglyphs)
                {
                  /* Proceed to the next grapheme cluster.  */
@@ -6337,7 +6322,7 @@
                }
              else
                {
-                 /* No more grapheme cluster in this composition.
+                 /* No more grapheme clusters in this composition.
                     Find the next stop position.  */
                  EMACS_INT stop = it->stop_charpos;
                  if (it->bidi_it.scan_dir < 0)
@@ -6351,7 +6336,7 @@
          else
            {
              /* Composition created while scanning backward.  */
-             /* Update IT's char/byte positions to point the last
+             /* Update IT's char/byte positions to point to the last
                 character of the previous grapheme cluster, or the
                 character visually after the current composition.  */
              bidi_get_next_char_visually (&it->bidi_it);
@@ -6365,7 +6350,7 @@
                }
              else
                {
-                 /* No more grapheme cluster in this composition.
+                 /* No more grapheme clusters in this composition.
                     Find the next stop position.  */
                  EMACS_INT stop = it->stop_charpos;
                  if (it->bidi_it.scan_dir < 0)
@@ -6398,8 +6383,8 @@
              IT_CHARPOS (*it) = it->bidi_it.charpos;
              if (prev_scan_dir != it->bidi_it.scan_dir)
                {
-                 /* As scan direction was changed, we must re-compute
-                    the stop position for composition.  */
+                 /* As the scan direction was changed, we must
+                    re-compute the stop position for composition.  */
                  EMACS_INT stop = it->stop_charpos;
                  if (it->bidi_it.scan_dir < 0)
                    stop = -1;


reply via email to

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