#include <config.h>
-#include <setjmp.h>
#include <intprops.h>
for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next)
{
if (tail->buffer->text != current_buffer->text)
- abort ();
+ emacs_abort ();
if (tail->charpos > Z)
- abort ();
+ emacs_abort ();
if (tail->bytepos > Z_BYTE)
- abort ();
+ emacs_abort ();
if (multibyte && ! CHAR_HEAD_P (FETCH_BYTE (tail->bytepos)))
- abort ();
+ emacs_abort ();
}
}
#ifdef BYTE_COMBINING_DEBUG
if (count_combining_before (string, nbytes, PT, PT_BYTE)
|| count_combining_after (string, nbytes, PT, PT_BYTE))
- abort ();
+ emacs_abort ();
#endif
/* Record deletion of the surrounding text that combines with
PT + nchars, PT_BYTE + nbytes,
before_markers);
- if (buffer_intervals (current_buffer))
- offset_intervals (current_buffer, PT, nchars);
+ offset_intervals (current_buffer, PT, nchars);
if (!inherit && buffer_intervals (current_buffer))
set_text_properties (make_number (PT), make_number (PT + nchars),
the text that has been stored by copy_text. */
if (count_combining_before (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE)
|| count_combining_after (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE))
- abort ();
+ emacs_abort ();
#endif
record_insert (PT, nchars);
the text that has been stored by copy_text. */
if (count_combining_before (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE)
|| count_combining_after (GPT_ADDR, outgoing_nbytes, PT, PT_BYTE))
- abort ();
+ emacs_abort ();
#endif
record_insert (PT, nchars);
PT_BYTE + outgoing_nbytes,
0);
- if (buffer_intervals (current_buffer))
- offset_intervals (current_buffer, PT, nchars);
+ offset_intervals (current_buffer, PT, nchars);
/* Get the intervals for the part of the string we are inserting. */
intervals = buffer_intervals (buf);
#ifdef BYTE_COMBINING_DEBUG
if (count_combining_before (GPT_ADDR, len_byte, from, from_byte)
|| count_combining_after (GPT_ADDR, len_byte, from, from_byte))
- abort ();
+ emacs_abort ();
#endif
if (STRINGP (prev_text))
else if (len < nchars_del)
adjust_overlays_for_delete (from, nchars_del - len);
- if (buffer_intervals (current_buffer))
- offset_intervals (current_buffer, from, len - nchars_del);
+ offset_intervals (current_buffer, from, len - nchars_del);
if (from < PT)
adjust_point (len - nchars_del, len_byte - nbytes_del);
the text that has been stored by copy_text. */
if (count_combining_before (GPT_ADDR, outgoing_insbytes, from, from_byte)
|| count_combining_after (GPT_ADDR, outgoing_insbytes, from, from_byte))
- abort ();
+ emacs_abort ();
#endif
if (! EQ (BVAR (current_buffer, undo_list), Qt))
eassert (GPT <= GPT_BYTE);
- /* Adjust the overlay center as needed. This must be done after
- adjusting the markers that bound the overlays. */
- adjust_overlays_for_delete (from, nchars_del);
- adjust_overlays_for_insert (from, inschars);
-
/* Adjust markers for the deletion and the insertion. */
if (markers)
adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del,
inschars, outgoing_insbytes);
+ /* Adjust the overlay center as needed. This must be done after
+ adjusting the markers that bound the overlays. */
+ adjust_overlays_for_delete (from, nchars_del);
+ adjust_overlays_for_insert (from, inschars);
+
offset_intervals (current_buffer, from, inschars - nchars_del);
/* Get the intervals for the part of the string we are inserting--
the text that has been stored by copy_text. */
if (count_combining_before (GPT_ADDR, insbytes, from, from_byte)
|| count_combining_after (GPT_ADDR, insbytes, from, from_byte))
- abort ();
+ emacs_abort ();
#endif
GAP_SIZE -= insbytes;
eassert (GPT <= GPT_BYTE);
+ /* Adjust markers for the deletion and the insertion. */
+ if (markers
+ && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes))
+ adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del,
+ inschars, insbytes);
+
/* Adjust the overlay center as needed. This must be done after
adjusting the markers that bound the overlays. */
if (nchars_del != inschars)
adjust_overlays_for_delete (from + inschars, nchars_del);
}
- /* Adjust markers for the deletion and the insertion. */
- if (markers
- && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes))
- adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del,
- inschars, insbytes);
-
offset_intervals (current_buffer, from, inschars - nchars_del);
/* Relocate point as if it were a marker. */
#ifdef BYTE_COMBINING_DEBUG
if (count_combining_before (BUF_BYTE_ADDRESS (current_buffer, to_byte),
Z_BYTE - to_byte, from, from_byte))
- abort ();
+ emacs_abort ();
#endif
if (ret_string || ! EQ (BVAR (current_buffer, undo_list), Qt))
non-nil, and insertion calls a file handler (e.g. through
lock_file) which scribbles into a temp file -- cyd */
if (!BUFFERP (combine_after_change_buffer)
- || NILP (BVAR (XBUFFER (combine_after_change_buffer), name)))
+ || !BUFFER_LIVE_P (XBUFFER (combine_after_change_buffer)))
{
combine_after_change_list = Qnil;
return Qnil;