emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/minibuf.c,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/minibuf.c,v
Date: Fri, 01 Feb 2008 16:01:51 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     08/02/01 16:01:31

Index: src/minibuf.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/minibuf.c,v
retrieving revision 1.339
retrieving revision 1.340
diff -u -b -r1.339 -r1.340
--- src/minibuf.c       8 Jan 2008 20:44:14 -0000       1.339
+++ src/minibuf.c       1 Feb 2008 16:00:42 -0000       1.340
@@ -27,7 +27,7 @@
 #include "lisp.h"
 #include "commands.h"
 #include "buffer.h"
-#include "charset.h"
+#include "character.h"
 #include "dispextern.h"
 #include "keyboard.h"
 #include "frame.h"
@@ -2432,23 +2432,14 @@
 
   /* Now find first word-break in the stuff found by completion.
      i gets index in string of where to stop completing.  */
+  while (i_byte < SBYTES (completion))
   {
-    int len, c;
-    int bytes = SBYTES (completion);
-    register const unsigned char *completion_string = SDATA (completion);
-    for (; i_byte < SBYTES (completion); i_byte += len, i++)
-      {
-       c = STRING_CHAR_AND_LENGTH (completion_string + i_byte,
-                                   bytes - i_byte,
-                                   len);
+      int c;
+
+      FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c, completion, i, i_byte);
        if (SYNTAX (c) != Sword)
-         {
-           i_byte += len;
-           i++;
            break;
          }
-      }
-  }
 
   /* If got no characters, print help for user.  */
 
@@ -2728,7 +2719,7 @@
        doc: /* Terminate minibuffer input.  */)
      ()
 {
-  if (INTEGERP (last_command_char))
+  if (CHARACTERP (last_command_char))
     internal_self_insert (XINT (last_command_char), 0);
   else
     bitch_at_user ();




reply via email to

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