Mercurial > emacs
comparison src/marker.c @ 21497:837148a1541f
(buf_charpos_to_bytepos, buf_bytepos_to_charpos):
When calling set_marker_both, pass the right buffer.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 13 Apr 1998 18:56:44 +0000 |
parents | 96dd58f4f3bb |
children | fa9ff387d260 |
comparison
equal
deleted
inserted
replaced
21496:6ec5e85328a9 | 21497:837148a1541f |
---|---|
197 /* If this position is quite far from the nearest known position, | 197 /* If this position is quite far from the nearest known position, |
198 cache the correspondence by creating a marker here. | 198 cache the correspondence by creating a marker here. |
199 It will last until the next GC. */ | 199 It will last until the next GC. */ |
200 if (record) | 200 if (record) |
201 { | 201 { |
202 Lisp_Object marker; | 202 Lisp_Object marker, buffer; |
203 marker = Fmake_marker (); | 203 marker = Fmake_marker (); |
204 set_marker_both (marker, Qnil, best_below, best_below_byte); | 204 XSETBUFFER (buffer, b); |
205 set_marker_both (marker, buffer, best_below, best_below_byte); | |
205 } | 206 } |
206 | 207 |
207 if (byte_debug_flag) | 208 if (byte_debug_flag) |
208 byte_char_debug_check (b, charpos, best_below_byte); | 209 byte_char_debug_check (b, charpos, best_below_byte); |
209 | 210 |
227 /* If this position is quite far from the nearest known position, | 228 /* If this position is quite far from the nearest known position, |
228 cache the correspondence by creating a marker here. | 229 cache the correspondence by creating a marker here. |
229 It will last until the next GC. */ | 230 It will last until the next GC. */ |
230 if (record) | 231 if (record) |
231 { | 232 { |
232 Lisp_Object marker; | 233 Lisp_Object marker, buffer; |
233 marker = Fmake_marker (); | 234 marker = Fmake_marker (); |
234 set_marker_both (marker, Qnil, best_above, best_above_byte); | 235 XSETBUFFER (buffer, b); |
236 set_marker_both (marker, buffer, best_above, best_above_byte); | |
235 } | 237 } |
236 | 238 |
237 if (byte_debug_flag) | 239 if (byte_debug_flag) |
238 byte_char_debug_check (b, charpos, best_above_byte); | 240 byte_char_debug_check (b, charpos, best_above_byte); |
239 | 241 |
363 /* If this position is quite far from the nearest known position, | 365 /* If this position is quite far from the nearest known position, |
364 cache the correspondence by creating a marker here. | 366 cache the correspondence by creating a marker here. |
365 It will last until the next GC. */ | 367 It will last until the next GC. */ |
366 if (record) | 368 if (record) |
367 { | 369 { |
368 Lisp_Object marker; | 370 Lisp_Object marker, buffer; |
369 marker = Fmake_marker (); | 371 marker = Fmake_marker (); |
370 set_marker_both (marker, Qnil, best_below, best_below_byte); | 372 XSETBUFFER (buffer, b); |
373 set_marker_both (marker, buffer, best_below, best_below_byte); | |
371 } | 374 } |
372 | 375 |
373 if (byte_debug_flag) | 376 if (byte_debug_flag) |
374 byte_char_debug_check (b, best_below, bytepos); | 377 byte_char_debug_check (b, best_below, bytepos); |
375 | 378 |
393 /* If this position is quite far from the nearest known position, | 396 /* If this position is quite far from the nearest known position, |
394 cache the correspondence by creating a marker here. | 397 cache the correspondence by creating a marker here. |
395 It will last until the next GC. */ | 398 It will last until the next GC. */ |
396 if (record) | 399 if (record) |
397 { | 400 { |
398 Lisp_Object marker; | 401 Lisp_Object marker, buffer; |
399 marker = Fmake_marker (); | 402 marker = Fmake_marker (); |
400 set_marker_both (marker, Qnil, best_above, best_above_byte); | 403 XSETBUFFER (buffer, b); |
404 set_marker_both (marker, buffer, best_above, best_above_byte); | |
401 } | 405 } |
402 | 406 |
403 if (byte_debug_flag) | 407 if (byte_debug_flag) |
404 byte_char_debug_check (b, best_above, bytepos); | 408 byte_char_debug_check (b, best_above, bytepos); |
405 | 409 |