]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix comments from 2010-05-14T04:14:23Z!handa@etlken.
authorEli Zaretskii <eliz@gnu.org>
Fri, 14 May 2010 13:44:12 +0000 (16:44 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 14 May 2010 13:44:12 +0000 (16:44 +0300)
src/composite.c
src/xdisp.c

index cbfb4aa66d367d0691baa28da505103501bed00d..f392053bac9321c3a5d08076b4b55722969848d7 100644 (file)
@@ -1150,13 +1150,13 @@ composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string)
       /* 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 @@ composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string)
                    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))
index 16936b977fd9c0bc0045be9e56b1cea103157d53..6375e03218ac3c061f99aad59e0b7b2dafaeda48 100644 (file)
@@ -6307,29 +6307,14 @@ set_iterator_to_next (it, reseat_p)
          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 @@ set_iterator_to_next (it, reseat_p)
                }
              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 @@ set_iterator_to_next (it, reseat_p)
          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 @@ set_iterator_to_next (it, reseat_p)
                }
              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 @@ set_iterator_to_next (it, reseat_p)
              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;