changeset 89059:288b118954ca

(Fminibuffer_complete_word): Use the macro FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
author Kenichi Handa <handa@m17n.org>
date Tue, 03 Sep 2002 04:08:49 +0000
parents c58aec54e4fb
children e2cc0f05e825
files src/minibuf.c
diffstat 1 files changed, 8 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Tue Sep 03 04:08:33 2002 +0000
+++ b/src/minibuf.c	Tue Sep 03 04:08:49 2002 +0000
@@ -1967,22 +1967,14 @@
 
   /* Now find first word-break in the stuff found by completion.
      i gets index in string of where to stop completing.  */
-  {
-    int len, c;
-    completion_string = XSTRING (completion)->data;
-    for (; i_byte < STRING_BYTES (XSTRING (completion)); i_byte += len, i++)
-      {
-	c = STRING_CHAR_AND_LENGTH (completion_string + i_byte,
-				    bytes - i_byte,
-				    len);
-	if (SYNTAX (c) != Sword)
-	  {
-	    i_byte += len;
-	    i++;
-	    break;
-	  }
-      }
-  }
+  while (i_byte < STRING_BYTES (XSTRING (completion)))
+    {
+      int c;
+
+      FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c, completion, i, i_byte);
+      if (SYNTAX (c) != Sword)
+	break;
+    }
 
   /* If got no characters, print help for user.  */