}
if (VECTORP (current_buffer->abbrev_table))
- sym = oblookup (current_buffer->abbrev_table, buffer, p - buffer);
+ sym = oblookup (current_buffer->abbrev_table, buffer,
+ wordend - wordstart, wordend_byte - wordstart_byte);
else
XSETFASTINT (sym, 0);
if (INTEGERP (sym) || NILP (XSYMBOL (sym)->value))
- sym = oblookup (Vglobal_abbrev_table, buffer, p - buffer);
+ sym = oblookup (Vglobal_abbrev_table, buffer,
+ wordend - wordstart, wordend_byte - wordstart_byte);
if (INTEGERP (sym) || NILP (XSYMBOL (sym)->value))
return value;
del_range_both (wordstart, wordend, wordstart_byte, wordend_byte, 1);
- insert_from_string (expansion, 0, XSTRING (expansion)->size, 1);
+ insert_from_string (expansion, 0, 0, XSTRING (expansion)->size,
+ XSTRING (expansion)->size_byte, 1);
SET_PT (PT + whitecnt);
if (uccount && !lccount)
if (!STRINGP (val))
error ("value of abbrev-symbol must be a string");
zv_before = ZV;
- del_range_byte (PT_BYTE, PT_BYTE + XSTRING (val)->size, 1);
+ del_range_byte (PT_BYTE, PT_BYTE + XSTRING (val)->size_byte, 1);
/* Don't inherit properties here; just copy from old contents. */
- insert_from_string (Vlast_abbrev_text, 0,
- XSTRING (Vlast_abbrev_text)->size, 0);
+ insert_from_string (Vlast_abbrev_text, 0, 0,
+ XSTRING (Vlast_abbrev_text)->size,
+ XSTRING (Vlast_abbrev_text)->size_byte, 0);
Vlast_abbrev_text = Qnil;
/* Total number of characters deleted. */
adjust = ZV - zv_before;