diff options
Diffstat (limited to 'src/abbrev.c')
-rw-r--r-- | src/abbrev.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/abbrev.c b/src/abbrev.c index ac132f20023..086a58021fb 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */ #include "commands.h" #include "buffer.h" #include "window.h" -#include "charset.h" +#include "character.h" #include "syntax.h" /* An abbrev table is an obarray. @@ -388,9 +388,15 @@ Returns the abbrev symbol, if expansion took place. */) int pos = wordstart_byte; /* Find the initial. */ - while (pos < PT_BYTE - && SYNTAX (*BUF_BYTE_ADDRESS (current_buffer, pos)) != Sword) - pos++; + if (multibyte) + while (pos < PT_BYTE + && SYNTAX (FETCH_MULTIBYTE_CHAR (pos)) != Sword) + INC_POS (pos); + else + while (pos < PT_BYTE + && (SYNTAX (*BUF_BYTE_ADDRESS (current_buffer, pos)) + != Sword)) + pos++; /* Change just that. */ pos = BYTE_TO_CHAR (pos); |