Norbert Koch <nk(a)LF.net> writes:
(let ((str "as you like it"))
(if (string-match "^.*$" str)
(replace-match "\\U" t nil str)))
The "\\U" might well be pretty dumb, but..
Here's the patch to fix it.
It might be straightforward to initialize accum to empty
string but I'd rather not make temporary strings.
2000-10-03 Yoshiki Hayashi <yoshiki(a)xemacs.org>
* search.c (Freplace_match): Set newtext to an empty string.
Index: search.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/search.c,v
retrieving revision 1.14.2.12
diff -u -r1.14.2.12 search.c
--- search.c 2000/09/16 08:50:12 1.14.2.12
+++ search.c 2000/10/03 07:35:06
@@ -2083,6 +2083,10 @@
newtext = accum;
}
+ /* newtext can be nil. */
+ if (NILP (newtext))
+ newtext = build_string ("");
+
if (case_action == all_caps)
newtext = Fupcase (newtext, buffer);
else if (case_action == cap_initial)
--
Yoshiki Hayashi