which can happen if set-match-data is using a pre-consed list.
+2004-06-29 David Kastrup <dak@gnu.org>
+
+ * search.c (Fset_match_data): Allow buffer before end of list
+ which can happen if set-match-data is using a pre-consed list.
+
2004-06-28 Steven Tamm <tamm@Steven-Tamms-Computer.local>
* macterm.c (XTread_socket): Correctly set the frame position
search_regs.num_regs = length;
}
- for (i = 0; i < length; i++)
+ for (i = 0;; i++)
{
marker = Fcar (list);
+ if (BUFFERP(marker))
+ {
+ XSETBUFFER(last_thing_searched, marker);
+ break;
+ }
+ if (i >= length)
+ break;
if (NILP (marker))
{
search_regs.start[i] = -1;
search_regs.start[i] = -1;
}
- if (CONSP(list) && BUFFERP(XCAR(list))) {
- XSETBUFFER(last_thing_searched, XCAR(list));
- }
-
return Qnil;
}