aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-08-29 16:14:26 +0000
committerRichard M. Stallman2003-08-29 16:14:26 +0000
commitf8f096e9beb4458f7c1c5fe37567de30ac4fcc26 (patch)
tree0d1d90776b7b6aa80d3e50305c997d20c6b54ddb
parent74f8a3338490f7ce2fadac60d26a9024fc007f70 (diff)
downloademacs-f8f096e9beb4458f7c1c5fe37567de30ac4fcc26.tar.gz
emacs-f8f096e9beb4458f7c1c5fe37567de30ac4fcc26.zip
(Fexpand_abbrev): Insert before deleting.
-rw-r--r--src/abbrev.c7
1 files 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. */)
356 { 356 {
357 SET_PT (wordstart); 357 SET_PT (wordstart);
358 358
359 del_range_both (wordstart, wordstart_byte, wordend, wordend_byte, 1);
360
361 insert_from_string (expansion, 0, 0, SCHARS (expansion), 359 insert_from_string (expansion, 0, 0, SCHARS (expansion),
362 SBYTES (expansion), 1); 360 SBYTES (expansion), 1);
361 del_range_both (PT, PT_BYTE,
362 wordend + (PT - wordstart),
363 wordend_byte + (PT_BYTE - wordstart_byte),
364 1);
365
363 SET_PT (PT + whitecnt); 366 SET_PT (PT + whitecnt);
364 367
365 if (uccount && !lccount) 368 if (uccount && !lccount)