summaryrefslogtreecommitdiff
path: root/src/abbrev.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2003-09-08 12:53:41 +0000
committerKenichi Handa <handa@m17n.org>2003-09-08 12:53:41 +0000
commit8f924df7df019cce90537647de2627581043b5c4 (patch)
tree6c40bd05679425e710d6b2e5649eae3da5e40a52 /src/abbrev.c
parent463f5630a5e7cbe7f042bc1175d1fa1c4e98860f (diff)
parent9d4807432a01f9b3cc519fcfa3ea92a70ffa7f43 (diff)
downloademacs-8f924df7df019cce90537647de2627581043b5c4.tar.gz
*** empty log message ***
Diffstat (limited to 'src/abbrev.c')
-rw-r--r--src/abbrev.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/abbrev.c b/src/abbrev.c
index dabc03b2a55..e3e0e28210b 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.
@@ -385,9 +385,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);