Mercurial > emacs
comparison src/insdel.c @ 4712:367dc6ff392c
(insert_from_string): Pass extra arg to graft_intervals_into_buffer.
New arg INHERIT.
(insert_from_string_before_markers): New arg INHERIT.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 14 Sep 1993 12:08:02 +0000 |
parents | 1fc792473491 |
children | b30763a185e9 |
comparison
equal
deleted
inserted
replaced
4711:94fe4e71f7fc | 4712:367dc6ff392c |
---|---|
325 | 325 |
326 It does not work to use `insert' for this, because a GC could happen | 326 It does not work to use `insert' for this, because a GC could happen |
327 before we bcopy the stuff into the buffer, and relocate the string | 327 before we bcopy the stuff into the buffer, and relocate the string |
328 without insert noticing. */ | 328 without insert noticing. */ |
329 | 329 |
330 insert_from_string (string, pos, length) | 330 insert_from_string (string, pos, length, inherit) |
331 Lisp_Object string; | 331 Lisp_Object string; |
332 register int pos, length; | 332 register int pos, length; |
333 int inherit; | |
333 { | 334 { |
334 register Lisp_Object temp; | 335 register Lisp_Object temp; |
335 struct gcpro gcpro1; | 336 struct gcpro gcpro1; |
336 | 337 |
337 if (length < 1) | 338 if (length < 1) |
364 ZV += length; | 365 ZV += length; |
365 Z += length; | 366 Z += length; |
366 | 367 |
367 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ | 368 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ |
368 graft_intervals_into_buffer (XSTRING (string)->intervals, point, | 369 graft_intervals_into_buffer (XSTRING (string)->intervals, point, |
369 current_buffer); | 370 current_buffer, inherit); |
370 | 371 |
371 SET_PT (point + length); | 372 SET_PT (point + length); |
372 | 373 |
373 signal_after_change (point-length, 0, length); | 374 signal_after_change (point-length, 0, length); |
374 } | 375 } |
405 adjust_markers (opoint - 1, opoint, length); | 406 adjust_markers (opoint - 1, opoint, length); |
406 } | 407 } |
407 | 408 |
408 /* Insert part of a Lisp string, relocating markers after. */ | 409 /* Insert part of a Lisp string, relocating markers after. */ |
409 | 410 |
410 insert_from_string_before_markers (string, pos, length) | 411 insert_from_string_before_markers (string, pos, length, inherit) |
411 Lisp_Object string; | 412 Lisp_Object string; |
412 register int pos, length; | 413 register int pos, length; |
414 int inherit; | |
413 { | 415 { |
414 register int opoint = point; | 416 register int opoint = point; |
415 insert_from_string (string, pos, length); | 417 insert_from_string (string, pos, length, inherit); |
416 adjust_markers (opoint - 1, opoint, length); | 418 adjust_markers (opoint - 1, opoint, length); |
417 } | 419 } |
418 | 420 |
419 /* Delete characters in current buffer | 421 /* Delete characters in current buffer |
420 from FROM up to (but not including) TO. */ | 422 from FROM up to (but not including) TO. */ |