aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-06-22 23:18:59 +0000
committerKim F. Storm2005-06-22 23:18:59 +0000
commit51f10faa1790cd6fd5abcd669bbf95e3f263bc07 (patch)
treec0c3e27fd9c2ec77d93446c46c43852cf3c2456c /src
parentd1fab151dfb28b8f423b7cfa35cf5f8e3f731461 (diff)
downloademacs-51f10faa1790cd6fd5abcd669bbf95e3f263bc07.tar.gz
emacs-51f10faa1790cd6fd5abcd669bbf95e3f263bc07.zip
(Fmatch_data): Remove evaporate option.
(Fmatch_data): Do not mention evaporate option in doc string. Add commentary explaining evaporate arg (for internal use only). (unwind_set_match_data): Add comment on evaporate use.
Diffstat (limited to 'src')
-rw-r--r--src/search.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/search.c b/src/search.c
index c1f2fd77cec..3c9b70b1581 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2758,9 +2758,6 @@ is done.
2758If optional third arg RESEAT is non-nil, any previous markers on the 2758If optional third arg RESEAT is non-nil, any previous markers on the
2759REUSE list will be modified to point to nowhere. 2759REUSE list will be modified to point to nowhere.
2760 2760
2761If RESEAT is `evaporate', put markers back on the free list.
2762Note: No other references to the markers must exist if you use this.
2763
2764Return value is undefined if the last search failed. */) 2761Return value is undefined if the last search failed. */)
2765 (integers, reuse, reseat) 2762 (integers, reuse, reseat)
2766 Lisp_Object integers, reuse, reseat; 2763 Lisp_Object integers, reuse, reseat;
@@ -2773,10 +2770,7 @@ Return value is undefined if the last search failed. */)
2773 for (tail = reuse; CONSP (tail); tail = XCDR (tail)) 2770 for (tail = reuse; CONSP (tail); tail = XCDR (tail))
2774 if (MARKERP (XCAR (tail))) 2771 if (MARKERP (XCAR (tail)))
2775 { 2772 {
2776 if (EQ (reseat, Qevaporate)) 2773 unchain_marker (XMARKER (XCAR (tail)));
2777 free_marker (XCAR (tail));
2778 else
2779 unchain_marker (XMARKER (XCAR (tail)));
2780 XSETCAR (tail, Qnil); 2774 XSETCAR (tail, Qnil);
2781 } 2775 }
2782 2776
@@ -2851,14 +2845,17 @@ Return value is undefined if the last search failed. */)
2851 return reuse; 2845 return reuse;
2852} 2846}
2853 2847
2848/* Internal usage only:
2849 If RESEAT is `evaporate', put the markers back on the free list
2850 immediately. No other references to the markers must exist in this case,
2851 so it is used only internally on the unwind stack and save-match-data from
2852 Lisp. */
2854 2853
2855DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0, 2854DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0,
2856 doc: /* Set internal data on last search match from elements of LIST. 2855 doc: /* Set internal data on last search match from elements of LIST.
2857LIST should have been created by calling `match-data' previously. 2856LIST should have been created by calling `match-data' previously.
2858 2857
2859If optional arg RESEAT is non-nil, make markers on LIST point nowhere. 2858If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
2860If RESEAT is `evaporate', put the markers back on the free list.
2861Note: No other references to the markers must exist if you use this. */)
2862 (list, reseat) 2859 (list, reseat)
2863 register Lisp_Object list, reseat; 2860 register Lisp_Object list, reseat;
2864{ 2861{
@@ -3026,6 +3023,7 @@ static Lisp_Object
3026unwind_set_match_data (list) 3023unwind_set_match_data (list)
3027 Lisp_Object list; 3024 Lisp_Object list;
3028{ 3025{
3026 /* It is safe to free (evaporate) the markers immediately. */
3029 return Fset_match_data (list, Qevaporate); 3027 return Fset_match_data (list, Qevaporate);
3030} 3028}
3031 3029