the deletion will be undone first. Thus, undo
will insert before deleting, and thus will keep
the markers before and after this text separate. */
the deletion will be undone first. Thus, undo
will insert before deleting, and thus will keep
the markers before and after this text separate. */
- record_insert (from + SCHARS (deletion), inschars);
- record_delete (from, deletion);
+ if (!NILP (deletion))
+ {
+ record_insert (from + SCHARS (deletion), inschars);
+ record_delete (from, deletion);
+ }