# HG changeset patch # User Kenichi Handa # Date 887938847 0 # Node ID 2fc5eb0799fe2d9890f57513e5110a97bcb3b533 # Parent eebcbb4b56bdf63a3f760704a4a40fa308d5bfd6 (advance_to_char_boundary): Make the behaviour consistent with INC_POS. diff -r eebcbb4b56bd -r 2fc5eb0799fe src/buffer.c --- a/src/buffer.c Fri Feb 20 01:40:47 1998 +0000 +++ b/src/buffer.c Fri Feb 20 01:40:47 1998 +0000 @@ -1679,21 +1679,15 @@ advance_to_char_boundary (byte_pos) int byte_pos; { - int pos = byte_pos; - - while (1) + int c = FETCH_BYTE (byte_pos); + + while (! CHAR_HEAD_P (c)) { - int c = FETCH_BYTE (pos); - if (SINGLE_BYTE_CHAR_P (c)) - break; - if (c == LEADING_CODE_COMPOSITION) - break; - if (BYTES_BY_CHAR_HEAD (c) > 1) - break; - pos++; + byte_pos++; + c = FETCH_BYTE (byte_pos); } - return pos; + return byte_pos; } DEFUN ("set-buffer-multibyte", Fset_buffer_multibyte, Sset_buffer_multibyte,