[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/search.c
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/search.c |
Date: |
Wed, 22 Jun 2005 19:19:00 -0400 |
Index: emacs/src/search.c
diff -c emacs/src/search.c:1.194 emacs/src/search.c:1.195
*** emacs/src/search.c:1.194 Wed Jun 8 22:54:39 2005
--- emacs/src/search.c Wed Jun 22 23:18:59 2005
***************
*** 2758,2766 ****
If optional third arg RESEAT is non-nil, any previous markers on the
REUSE list will be modified to point to nowhere.
- If RESEAT is `evaporate', put markers back on the free list.
- Note: No other references to the markers must exist if you use this.
-
Return value is undefined if the last search failed. */)
(integers, reuse, reseat)
Lisp_Object integers, reuse, reseat;
--- 2758,2763 ----
***************
*** 2773,2782 ****
for (tail = reuse; CONSP (tail); tail = XCDR (tail))
if (MARKERP (XCAR (tail)))
{
! if (EQ (reseat, Qevaporate))
! free_marker (XCAR (tail));
! else
! unchain_marker (XMARKER (XCAR (tail)));
XSETCAR (tail, Qnil);
}
--- 2770,2776 ----
for (tail = reuse; CONSP (tail); tail = XCDR (tail))
if (MARKERP (XCAR (tail)))
{
! unchain_marker (XMARKER (XCAR (tail)));
XSETCAR (tail, Qnil);
}
***************
*** 2851,2864 ****
return reuse;
}
DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0,
doc: /* Set internal data on last search match from elements of LIST.
LIST should have been created by calling `match-data' previously.
! If optional arg RESEAT is non-nil, make markers on LIST point nowhere.
! If RESEAT is `evaporate', put the markers back on the free list.
! Note: No other references to the markers must exist if you use this. */)
(list, reseat)
register Lisp_Object list, reseat;
{
--- 2845,2861 ----
return reuse;
}
+ /* Internal usage only:
+ If RESEAT is `evaporate', put the markers back on the free list
+ immediately. No other references to the markers must exist in this case,
+ so it is used only internally on the unwind stack and save-match-data from
+ Lisp. */
DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0,
doc: /* Set internal data on last search match from elements of LIST.
LIST should have been created by calling `match-data' previously.
! If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
(list, reseat)
register Lisp_Object list, reseat;
{
***************
*** 3026,3031 ****
--- 3023,3029 ----
unwind_set_match_data (list)
Lisp_Object list;
{
+ /* It is safe to free (evaporate) the markers immediately. */
return Fset_match_data (list, Qevaporate);
}