Mercurial > emacs
changeset 8646:0f05e3e89f87
(Finsert_char): New arg INHERIT.
Use insert_and_inherit if requested.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 28 Aug 1994 06:07:15 +0000 |
parents | 8217ec286828 |
children | d66b80e5bc77 |
files | src/editfns.c |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/editfns.c Sun Aug 28 04:14:59 1994 +0000 +++ b/src/editfns.c Sun Aug 28 06:07:15 1994 +0000 @@ -856,12 +856,14 @@ return Qnil; } -DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 2, 0, +DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, "Insert COUNT (second arg) copies of CHAR (first arg).\n\ Point and all markers are affected as in the function `insert'.\n\ -Both arguments are required.") - (chr, count) - Lisp_Object chr, count; +Both arguments are required.\n\ +The optional third arg INHERIT, if non-nil, says to inherit text properties\n\ +from adjoining text, if those properties are sticky.") + (chr, count, inherit) + Lisp_Object chr, count, inherit; { register unsigned char *string; register int strlen; @@ -879,7 +881,10 @@ string[i] = XFASTINT (chr); while (n >= strlen) { - insert (string, strlen); + if (!NILP (inherit)) + insert_and_inherit (string, strlen); + else + insert (string, strlen); n -= strlen; } if (n > 0)