Commit 12038f9f authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(save_excursion_restore, transpose_markers): Update for new types.

parent 65745fad
...@@ -868,7 +868,7 @@ save_excursion_restore (info) ...@@ -868,7 +868,7 @@ save_excursion_restore (info)
/* Point marker. */ /* Point marker. */
tem = XCAR (info); tem = XCAR (info);
Fgoto_char (tem); Fgoto_char (tem);
unchain_marker (tem); unchain_marker (XMARKER (tem));
/* Mark marker. */ /* Mark marker. */
info = XCDR (info); info = XCDR (info);
...@@ -876,7 +876,7 @@ save_excursion_restore (info) ...@@ -876,7 +876,7 @@ save_excursion_restore (info)
omark = Fmarker_position (current_buffer->mark); omark = Fmarker_position (current_buffer->mark);
Fset_marker (current_buffer->mark, tem, Fcurrent_buffer ()); Fset_marker (current_buffer->mark, tem, Fcurrent_buffer ());
nmark = Fmarker_position (tem); nmark = Fmarker_position (tem);
unchain_marker (tem); unchain_marker (XMARKER (tem));
/* visible */ /* visible */
info = XCDR (info); info = XCDR (info);
...@@ -3814,7 +3814,7 @@ transpose_markers (start1, end1, start2, end2, ...@@ -3814,7 +3814,7 @@ transpose_markers (start1, end1, start2, end2,
register int start1_byte, end1_byte, start2_byte, end2_byte; register int start1_byte, end1_byte, start2_byte, end2_byte;
{ {
register int amt1, amt1_byte, amt2, amt2_byte, diff, diff_byte, mpos; register int amt1, amt1_byte, amt2, amt2_byte, diff, diff_byte, mpos;
register Lisp_Object marker; register struct Lisp_Marker *marker;
/* Update point as if it were a marker. */ /* Update point as if it were a marker. */
if (PT < start1) if (PT < start1)
...@@ -3849,10 +3849,9 @@ transpose_markers (start1, end1, start2, end2, ...@@ -3849,10 +3849,9 @@ transpose_markers (start1, end1, start2, end2,
amt1_byte = (end2_byte - start2_byte) + (start2_byte - end1_byte); amt1_byte = (end2_byte - start2_byte) + (start2_byte - end1_byte);
amt2_byte = (end1_byte - start1_byte) + (start2_byte - end1_byte); amt2_byte = (end1_byte - start1_byte) + (start2_byte - end1_byte);
for (marker = BUF_MARKERS (current_buffer); !NILP (marker); for (marker = BUF_MARKERS (current_buffer); marker; marker = marker->next)
marker = XMARKER (marker)->chain)
{ {
mpos = marker_byte_position (marker); mpos = marker->bytepos;
if (mpos >= start1_byte && mpos < end2_byte) if (mpos >= start1_byte && mpos < end2_byte)
{ {
if (mpos < end1_byte) if (mpos < end1_byte)
...@@ -3861,9 +3860,9 @@ transpose_markers (start1, end1, start2, end2, ...@@ -3861,9 +3860,9 @@ transpose_markers (start1, end1, start2, end2,
mpos += diff_byte; mpos += diff_byte;
else else
mpos -= amt2_byte; mpos -= amt2_byte;
XMARKER (marker)->bytepos = mpos; marker->bytepos = mpos;
} }
mpos = XMARKER (marker)->charpos; mpos = marker->charpos;
if (mpos >= start1 && mpos < end2) if (mpos >= start1 && mpos < end2)
{ {
if (mpos < end1) if (mpos < end1)
...@@ -3873,7 +3872,7 @@ transpose_markers (start1, end1, start2, end2, ...@@ -3873,7 +3872,7 @@ transpose_markers (start1, end1, start2, end2,
else else
mpos -= amt2; mpos -= amt2;
} }
XMARKER (marker)->charpos = mpos; marker->charpos = mpos;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment