diff options
| -rw-r--r-- | src/search.c | 18 |
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. | |||
| 2758 | If optional third arg RESEAT is non-nil, any previous markers on the | 2758 | If optional third arg RESEAT is non-nil, any previous markers on the |
| 2759 | REUSE list will be modified to point to nowhere. | 2759 | REUSE list will be modified to point to nowhere. |
| 2760 | 2760 | ||
| 2761 | If RESEAT is `evaporate', put markers back on the free list. | ||
| 2762 | Note: No other references to the markers must exist if you use this. | ||
| 2763 | |||
| 2764 | Return value is undefined if the last search failed. */) | 2761 | Return 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 | ||
| 2855 | DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0, | 2854 | DEFUN ("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. |
| 2857 | LIST should have been created by calling `match-data' previously. | 2856 | LIST should have been created by calling `match-data' previously. |
| 2858 | 2857 | ||
| 2859 | If optional arg RESEAT is non-nil, make markers on LIST point nowhere. | 2858 | If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */) |
| 2860 | If RESEAT is `evaporate', put the markers back on the free list. | ||
| 2861 | Note: 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 | |||
| 3026 | unwind_set_match_data (list) | 3023 | unwind_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 | ||