From: Richard M. Stallman Date: Fri, 29 Aug 2003 16:14:26 +0000 (+0000) Subject: (Fexpand_abbrev): Insert before deleting. X-Git-Tag: ttn-vms-21-2-B4~8956 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f8f096e9beb4458f7c1c5fe37567de30ac4fcc26;p=emacs.git (Fexpand_abbrev): Insert before deleting. --- diff --git a/src/abbrev.c b/src/abbrev.c index dabc03b2a55..f6253f06ded 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -356,10 +356,13 @@ Returns the abbrev symbol, if expansion took place. */) { SET_PT (wordstart); - del_range_both (wordstart, wordstart_byte, wordend, wordend_byte, 1); - insert_from_string (expansion, 0, 0, SCHARS (expansion), SBYTES (expansion), 1); + del_range_both (PT, PT_BYTE, + wordend + (PT - wordstart), + wordend_byte + (PT_BYTE - wordstart_byte), + 1); + SET_PT (PT + whitecnt); if (uccount && !lccount)