aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorRichard M. Stallman1998-11-27 22:15:38 +0000
committerRichard M. Stallman1998-11-27 22:15:38 +0000
commitf4e09ae7107491e46bbbd984bd56c206498910e3 (patch)
treec19e54502577709d17d0b297b22a467eb4f7f199 /src/fns.c
parent6f39b7c89b5a60bb4c3f0270b162a5874d13aedd (diff)
downloademacs-f4e09ae7107491e46bbbd984bd56c206498910e3.tar.gz
emacs-f4e09ae7107491e46bbbd984bd56c206498910e3.zip
(Fstring_as_unibyte, Fstring_as_multibyte):
Clear text properties in the new string.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c
index 966e13fe17b..15ce7379dc7 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1002,7 +1002,9 @@ by using just the low 8 bits.")
1002DEFUN ("string-as-unibyte", Fstring_as_unibyte, Sstring_as_unibyte, 1002DEFUN ("string-as-unibyte", Fstring_as_unibyte, Sstring_as_unibyte,
1003 1, 1, 0, 1003 1, 1, 0,
1004 "Return a unibyte string with the same individual bytes as STRING.\n\ 1004 "Return a unibyte string with the same individual bytes as STRING.\n\
1005If STRING is unibyte, the result is STRING itself.") 1005If STRING is unibyte, the result is STRING itself.\n\
1006If STRING is multibyte, the result is STRING itself.\n\
1007Otherwise it is a newly created string, with no text properties.")
1006 (string) 1008 (string)
1007 Lisp_Object string; 1009 Lisp_Object string;
1008{ 1010{
@@ -1012,6 +1014,7 @@ If STRING is unibyte, the result is STRING itself.")
1012 { 1014 {
1013 string = Fcopy_sequence (string); 1015 string = Fcopy_sequence (string);
1014 XSTRING (string)->size = STRING_BYTES (XSTRING (string)); 1016 XSTRING (string)->size = STRING_BYTES (XSTRING (string));
1017 XSTRING (string)->intervals = NULL_INTERVAL;
1015 SET_STRING_BYTES (XSTRING (string), -1); 1018 SET_STRING_BYTES (XSTRING (string), -1);
1016 } 1019 }
1017 return string; 1020 return string;
@@ -1020,7 +1023,8 @@ If STRING is unibyte, the result is STRING itself.")
1020DEFUN ("string-as-multibyte", Fstring_as_multibyte, Sstring_as_multibyte, 1023DEFUN ("string-as-multibyte", Fstring_as_multibyte, Sstring_as_multibyte,
1021 1, 1, 0, 1024 1, 1, 0,
1022 "Return a multibyte string with the same individual bytes as STRING.\n\ 1025 "Return a multibyte string with the same individual bytes as STRING.\n\
1023If STRING is multibyte, the result is STRING itself.") 1026If STRING is multibyte, the result is STRING itself.\n\
1027Otherwise it is a newly created string, with no text properties.")
1024 (string) 1028 (string)
1025 Lisp_Object string; 1029 Lisp_Object string;
1026{ 1030{
@@ -1034,6 +1038,7 @@ If STRING is multibyte, the result is STRING itself.")
1034 string = Fcopy_sequence (string); 1038 string = Fcopy_sequence (string);
1035 XSTRING (string)->size = newlen; 1039 XSTRING (string)->size = newlen;
1036 XSTRING (string)->size_byte = nbytes; 1040 XSTRING (string)->size_byte = nbytes;
1041 XSTRING (string)->intervals = NULL_INTERVAL;
1037 } 1042 }
1038 return string; 1043 return string;
1039} 1044}