]> code.delx.au - gnu-emacs/blobdiff - src/abbrev.c
(Fset_window_margins): Allow only integers as args.
[gnu-emacs] / src / abbrev.c
index dabc03b2a556f915693caf7971b4f19c39a77543..1cf06946631119ca4513f497f8c8f4b48dd9a0aa 100644 (file)
@@ -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)
@@ -690,3 +693,6 @@ the current abbrev table before abbrev lookup happens.  */);
   defsubr (&Sinsert_abbrev_table_description);
   defsubr (&Sdefine_abbrev_table);
 }
+
+/* arch-tag: b721db69-f633-44a8-a361-c275acbdad7d
+   (do not change this comment) */