diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-08-29 16:14:26 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-08-29 16:14:26 +0000 |
commit | cc55c6fe79bf619c25bece59b4ee2cabb9f116e6 (patch) | |
tree | b40c4756594dcffe5e599922a0f5556fdf29dd08 /src/abbrev.c | |
parent | a175054da83c497edd882dacf7529890fa467b31 (diff) | |
download | emacs-cc55c6fe79bf619c25bece59b4ee2cabb9f116e6.tar.gz |
(Fexpand_abbrev): Insert before deleting.
Diffstat (limited to 'src/abbrev.c')
-rw-r--r-- | src/abbrev.c | 7 |
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. */) { 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) |