- adjust_markers_for_record_delete (PT, PT_BYTE,
- PT + combined_after_bytes,
- PT_BYTE + combined_after_bytes);
- record_delete (PT, deletion);
+ if (! EQ (current_buffer->undo_list, Qt))
+ deletion = make_buffer_string_both (from, from_byte,
+ from + combined_after_bytes,
+ from_byte + combined_after_bytes,
+ 1);
+
+ adjust_markers_for_record_delete (from, from_byte,
+ from + combined_after_bytes,
+ from_byte + combined_after_bytes);
+ if (! EQ (current_buffer->undo_list, Qt))
+ record_delete (from + nchars_del, deletion);