comparison src/abbrev.c @ 89051:98dcb14bf34c

(Fexpand_abbrev): Convert a unibyte character to multibyte if necessary.
author Kenichi Handa <handa@m17n.org>
date Tue, 03 Sep 2002 04:06:07 +0000
parents b09549c9663c
children 2f877ed80fa6
comparison
equal deleted inserted replaced
89050:c00be25be9ad 89051:98dcb14bf34c
293 { 293 {
294 register int c; 294 register int c;
295 295
296 FETCH_CHAR_ADVANCE (c, idx, idx_byte); 296 FETCH_CHAR_ADVANCE (c, idx, idx_byte);
297 if (! multibyte) 297 if (! multibyte)
298 { 298 MAKE_CHAR_MULTIBYTE (c);
299 MAKE_CHAR_MULTIBYTE (c);
300 }
301 299
302 if (UPPERCASEP (c)) 300 if (UPPERCASEP (c))
303 c = DOWNCASE (c), uccount++; 301 c = DOWNCASE (c), uccount++;
304 else if (! NOCASEP (c)) 302 else if (! NOCASEP (c))
305 lccount++; 303 lccount++;
382 /* Abbrev included some caps. Cap first initial of expansion */ 380 /* Abbrev included some caps. Cap first initial of expansion */
383 int pos = wordstart_byte; 381 int pos = wordstart_byte;
384 382
385 /* Find the initial. */ 383 /* Find the initial. */
386 while (pos < PT_BYTE 384 while (pos < PT_BYTE
387 && SYNTAX (*BUF_BYTE_ADDRESS (current_buffer, pos)) != Sword) 385 && SYNTAX (FETCH_CHAR_AS_MULTIBYTE (pos)) != Sword)
388 pos++; 386 pos++;
389 387
390 /* Change just that. */ 388 /* Change just that. */
391 pos = BYTE_TO_CHAR (pos); 389 pos = BYTE_TO_CHAR (pos);
392 Fupcase_initials_region (make_number (pos), make_number (pos + 1)); 390 Fupcase_initials_region (make_number (pos), make_number (pos + 1));