aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorKenichi Handa2002-08-20 13:05:44 +0000
committerKenichi Handa2002-08-20 13:05:44 +0000
commit48ef988f74da0a93c07ebf70174dfa8e1d25ce94 (patch)
tree75a6840d32af5eb04521c5a96b5b179845ccd10d /src/editfns.c
parenteeb7c1552d6ebd1454f7ea5e8e282a8cd6abd880 (diff)
downloademacs-48ef988f74da0a93c07ebf70174dfa8e1d25ce94.tar.gz
emacs-48ef988f74da0a93c07ebf70174dfa8e1d25ce94.zip
(Finsert_byte): New function.
(syms_of_editfns): Defsubr it.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/editfns.c b/src/editfns.c
index f758484ed08..ed0821b9e20 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2158,6 +2158,29 @@ from adjoining text, if those properties are sticky. */)
2158 return Qnil; 2158 return Qnil;
2159} 2159}
2160 2160
2161DEFUN ("insert-byte", Finsert_byte, Sinsert_byte, 2, 3, 0,
2162 doc: /* Insert COUNT (second arg) copies of BYTE (first arg).
2163Both arguments are required.
2164BYTE is a number of the range 0..255.
2165
2166If BYTE is 128..255 and the current buffer is multibyte, the
2167corresponding eight-bit character is inserted.
2168
2169Point, and before-insertion markers, are relocated as in the function `insert'.
2170The optional third arg INHERIT, if non-nil, says to inherit text properties
2171from adjoining text, if those properties are sticky. */)
2172 (byte, count, inherit)
2173 Lisp_Object byte, count, inherit;
2174{
2175 CHECK_NUMBER (byte);
2176 if (XINT (byte) < 0 || XINT (byte) > 255)
2177 args_out_of_range_3 (byte, make_number (0), make_number (255));
2178 if (XINT (byte) >= 128
2179 && ! NILP (current_buffer->enable_multibyte_characters))
2180 XSETFASTINT (byte, BYTE8_TO_CHAR (XINT (byte)));
2181 Finsert_char (byte, count, inherit);
2182}
2183
2161 2184
2162/* Making strings from buffer contents. */ 2185/* Making strings from buffer contents. */
2163 2186
@@ -4103,6 +4126,7 @@ functions if all the text being accessed has this property. */);
4103 defsubr (&Sinsert_and_inherit); 4126 defsubr (&Sinsert_and_inherit);
4104 defsubr (&Sinsert_and_inherit_before_markers); 4127 defsubr (&Sinsert_and_inherit_before_markers);
4105 defsubr (&Sinsert_char); 4128 defsubr (&Sinsert_char);
4129 defsubr (&Sinsert_byte);
4106 4130
4107 defsubr (&Suser_login_name); 4131 defsubr (&Suser_login_name);
4108 defsubr (&Suser_real_login_name); 4132 defsubr (&Suser_real_login_name);