comparison src/line-number.c @ 241:f955c73f5258 r20-5b19

Import from CVS: tag r20-5b19
author cvs
date Mon, 13 Aug 2007 10:16:16 +0200
parents 262b8bb4a523
children 558f606b08ae
comparison
equal deleted inserted replaced
240:835e739f3c17 241:f955c73f5258
132 for (i = 0; i < LINE_NUMBER_RING_SIZE; i++) 132 for (i = 0; i < LINE_NUMBER_RING_SIZE; i++)
133 { 133 {
134 if (!CONSP (ring[i])) 134 if (!CONSP (ring[i]))
135 break; 135 break;
136 /* As the marker stays behind the insertions, this check might 136 /* As the marker stays behind the insertions, this check might
137 as well be >=. However, Finsert_before_markers can move the 137 as well be `>'. However, Finsert_before_markers can move the
138 marker anyway, which bites in shell buffers. */ 138 marker anyway, which bites in shell buffers.
139
140 #### This is wrong; it works right, but forces recreation of
141 the cached marker (and recalculation of newlines) every time
142 a newline is inserted at point, which is way losing. Isn't
143 there a way to make a marker impervious to
144 Finsert_before_markers()?? Maybe I should convert to using
145 extents. */
139 if (marker_position (XCAR (ring[i])) >= pos) 146 if (marker_position (XCAR (ring[i])) >= pos)
140 { 147 {
141 /* Get the marker out of the way. */ 148 /* Get the marker out of the way. */
142 Fset_marker (XCAR (ring[i]), Qnil, lisp_buffer); 149 Fset_marker (XCAR (ring[i]), Qnil, lisp_buffer);
143 /* ...and shift the ring elements, up to the first nil. */ 150 /* ...and shift the ring elements, up to the first nil. */