From f8f096e9beb4458f7c1c5fe37567de30ac4fcc26 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 29 Aug 2003 16:14:26 +0000 Subject: [PATCH] (Fexpand_abbrev): Insert before deleting. --- src/abbrev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) -- 2.39.2