+2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * insdel.c (adjust_after_replace, replace_range, del_range_2):
+ Do not check whether undo is enabled because record_insert and
+ record_delete does that themselves.
+
2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
* xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
adjust_markers_for_insert (from, from_byte,
from + len, from_byte + len_byte, 0);
- if (! EQ (BVAR (current_buffer, undo_list), Qt))
- {
- if (nchars_del > 0)
- record_delete (from, prev_text);
- record_insert (from, len);
- }
+ if (nchars_del > 0)
+ record_delete (from, prev_text);
+ record_insert (from, len);
if (len > nchars_del)
adjust_overlays_for_insert (from, len - nchars_del);
emacs_abort ();
#endif
- if (! EQ (BVAR (current_buffer, undo_list), Qt))
- {
- /* Record the insertion first, so that when we undo,
- 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);
- }
+ /* Record the insertion first, so that when we undo,
+ 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);
GAP_SIZE -= outgoing_insbytes;
GPT += inschars;
so that undo handles this after reinserting the text. */
adjust_markers_for_delete (from, from_byte, to, to_byte);
- if (! EQ (BVAR (current_buffer, undo_list), Qt))
- record_delete (from, deletion);
+ record_delete (from, deletion);
MODIFF++;
CHARS_MODIFF = MODIFF;