aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/casefiddle.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 5597ba62ea3..4fcdcc0fee9 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -73,7 +73,8 @@ casify_object (flag, obj)
73DEFUN ("upcase", Fupcase, Supcase, 1, 1, 0, 73DEFUN ("upcase", Fupcase, Supcase, 1, 1, 0,
74 "Convert argument to upper case and return that.\n\ 74 "Convert argument to upper case and return that.\n\
75The argument may be a character or string. The result has the same type.\n\ 75The argument may be a character or string. The result has the same type.\n\
76The argument object is not altered. See also `capitalize'.") 76The argument object is not altered--the value is a copy.\n\
77See also `capitalize', `downcase' and `upcase-initials'.")
77 (obj) 78 (obj)
78 Lisp_Object obj; 79 Lisp_Object obj;
79{ 80{
@@ -83,7 +84,7 @@ The argument object is not altered. See also `capitalize'.")
83DEFUN ("downcase", Fdowncase, Sdowncase, 1, 1, 0, 84DEFUN ("downcase", Fdowncase, Sdowncase, 1, 1, 0,
84 "Convert argument to lower case and return that.\n\ 85 "Convert argument to lower case and return that.\n\
85The argument may be a character or string. The result has the same type.\n\ 86The argument may be a character or string. The result has the same type.\n\
86The argument object is not altered.") 87The argument object is not altered--the value is a copy.")
87 (obj) 88 (obj)
88 Lisp_Object obj; 89 Lisp_Object obj;
89{ 90{
@@ -95,13 +96,24 @@ DEFUN ("capitalize", Fcapitalize, Scapitalize, 1, 1, 0,
95This means that each word's first character is upper case\n\ 96This means that each word's first character is upper case\n\
96and the rest is lower case.\n\ 97and the rest is lower case.\n\
97The argument may be a character or string. The result has the same type.\n\ 98The argument may be a character or string. The result has the same type.\n\
98The argument object is not altered.") 99The argument object is not altered--the value is a copy.")
99 (obj) 100 (obj)
100 Lisp_Object obj; 101 Lisp_Object obj;
101{ 102{
102 return casify_object (CASE_CAPITALIZE, obj); 103 return casify_object (CASE_CAPITALIZE, obj);
103} 104}
104 105
106DEFUN ("upcase-initials", Fupcase_initials, Supcase_initials, 1, 1, 0,
107 "Convert the initial of each word in the argument to upper case.\n\
108Do not change the other letters of each word.\n\
109The argument may be a character or string. The result has the same type.\n\
110The argument object is not altered--the value is a copy.")
111 (obj)
112 Lisp_Object obj;
113{
114 return casify_object (CASE_CAPITALIZE_UP, obj);
115}
116
105/* Like Fcapitalize but change only the initials. */ 117/* Like Fcapitalize but change only the initials. */
106 118
107Lisp_Object 119Lisp_Object
@@ -186,6 +198,19 @@ character positions to operate on.")
186 return Qnil; 198 return Qnil;
187} 199}
188 200
201DEFUN ("upcase-initials-region", Fupcase_initials_region,
202 Supcase_initials_region, 2, 2, "r",
203 "Upcase the initial of each word in the region.\n\
204Subsequent letters of each word are not changed.\n\
205In programs, give two arguments, the starting and ending\n\
206character positions to operate on.")
207 (b, e)
208 Lisp_Object b, e;
209{
210 casify_region (CASE_CAPITALIZE_UP, b, e);
211 return Qnil;
212}
213
189/* Like Fcapitalize_region but change only the initials. */ 214/* Like Fcapitalize_region but change only the initials. */
190 215
191Lisp_Object 216Lisp_Object
@@ -268,9 +293,11 @@ syms_of_casefiddle ()
268 defsubr (&Supcase); 293 defsubr (&Supcase);
269 defsubr (&Sdowncase); 294 defsubr (&Sdowncase);
270 defsubr (&Scapitalize); 295 defsubr (&Scapitalize);
296 defsubr (&Supcase_initials);
271 defsubr (&Supcase_region); 297 defsubr (&Supcase_region);
272 defsubr (&Sdowncase_region); 298 defsubr (&Sdowncase_region);
273 defsubr (&Scapitalize_region); 299 defsubr (&Scapitalize_region);
300 defsubr (&Supcase_initials_region);
274 defsubr (&Supcase_word); 301 defsubr (&Supcase_word);
275 defsubr (&Sdowncase_word); 302 defsubr (&Sdowncase_word);
276 defsubr (&Scapitalize_word); 303 defsubr (&Scapitalize_word);