comparison src/insdel.c @ 1247:8dce1588f37f

(del_range): Call record_delete before updating point.
author Richard M. Stallman <rms@gnu.org>
date Mon, 28 Sep 1992 13:10:15 +0000
parents 3165b2697c78
children 74b26ab86df4
comparison
equal deleted inserted replaced
1246:5e25dd40a160 1247:8dce1588f37f
423 if (to < GPT) 423 if (to < GPT)
424 gap_left (to, 0); 424 gap_left (to, 0);
425 425
426 prepare_to_modify_buffer (from, to); 426 prepare_to_modify_buffer (from, to);
427 427
428 record_delete (from, numdel);
429 MODIFF++;
430
428 /* Relocate point as if it were a marker. */ 431 /* Relocate point as if it were a marker. */
429 if (from < point) 432 if (from < point)
430 { 433 {
431 if (point < to) 434 if (point < to)
432 SET_PT (from); 435 SET_PT (from);
433 else 436 else
434 SET_PT (point - numdel); 437 SET_PT (point - numdel);
435 } 438 }
436
437 record_delete (from, numdel);
438 MODIFF++;
439 439
440 /* Relocate all markers pointing into the new, larger gap 440 /* Relocate all markers pointing into the new, larger gap
441 to point at the end of the text before the gap. */ 441 to point at the end of the text before the gap. */
442 adjust_markers (to + GAP_SIZE, to + GAP_SIZE, - numdel - GAP_SIZE); 442 adjust_markers (to + GAP_SIZE, to + GAP_SIZE, - numdel - GAP_SIZE);
443 443