diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/search.c | 28 |
2 files changed, 20 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e620d1e9e9e..0fb4f189fb9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | 2007-11-16 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * search.c (Fset_match_data): Remove the `evaporate' feature. | ||
| 4 | (unwind_set_match_data): Don't use the `evaporate' feature. | ||
| 5 | |||
| 1 | 2007-11-15 Andreas Schwab <schwab@suse.de> | 6 | 2007-11-15 Andreas Schwab <schwab@suse.de> |
| 2 | 7 | ||
| 3 | * editfns.c (Fformat): Correctly format EMACS_INT values. Also | 8 | * editfns.c (Fformat): Correctly format EMACS_INT values. |
| 4 | take precision into account when formatting an integer. | 9 | Also take precision into account when formatting an integer. |
| 5 | 10 | ||
| 6 | 2007-11-15 Juanma Barranquero <lekktu@gmail.com> | 11 | 2007-11-15 Juanma Barranquero <lekktu@gmail.com> |
| 7 | 12 | ||
diff --git a/src/search.c b/src/search.c index 3a9fabeb3ce..ad4fbc45469 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -2892,11 +2892,15 @@ Return value is undefined if the last search failed. */) | |||
| 2892 | return reuse; | 2892 | return reuse; |
| 2893 | } | 2893 | } |
| 2894 | 2894 | ||
| 2895 | /* Internal usage only: | 2895 | /* We used to have an internal use variant of `reseat' described as: |
| 2896 | If RESEAT is `evaporate', put the markers back on the free list | 2896 | |
| 2897 | immediately. No other references to the markers must exist in this case, | 2897 | If RESEAT is `evaporate', put the markers back on the free list |
| 2898 | so it is used only internally on the unwind stack and save-match-data from | 2898 | immediately. No other references to the markers must exist in this |
| 2899 | Lisp. */ | 2899 | case, so it is used only internally on the unwind stack and |
| 2900 | save-match-data from Lisp. | ||
| 2901 | |||
| 2902 | But it was ill-conceived: those supposedly-internal markers get exposed via | ||
| 2903 | the undo-list, so freeing them here is unsafe. */ | ||
| 2900 | 2904 | ||
| 2901 | DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0, | 2905 | DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0, |
| 2902 | doc: /* Set internal data on last search match from elements of LIST. | 2906 | doc: /* Set internal data on last search match from elements of LIST. |
| @@ -2981,10 +2985,7 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */) | |||
| 2981 | 2985 | ||
| 2982 | if (!NILP (reseat) && MARKERP (m)) | 2986 | if (!NILP (reseat) && MARKERP (m)) |
| 2983 | { | 2987 | { |
| 2984 | if (EQ (reseat, Qevaporate)) | 2988 | unchain_marker (XMARKER (m)); |
| 2985 | free_marker (m); | ||
| 2986 | else | ||
| 2987 | unchain_marker (XMARKER (m)); | ||
| 2988 | XSETCAR (list, Qnil); | 2989 | XSETCAR (list, Qnil); |
| 2989 | } | 2990 | } |
| 2990 | 2991 | ||
| @@ -3002,10 +3003,7 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */) | |||
| 3002 | 3003 | ||
| 3003 | if (!NILP (reseat) && MARKERP (m)) | 3004 | if (!NILP (reseat) && MARKERP (m)) |
| 3004 | { | 3005 | { |
| 3005 | if (EQ (reseat, Qevaporate)) | 3006 | unchain_marker (XMARKER (m)); |
| 3006 | free_marker (m); | ||
| 3007 | else | ||
| 3008 | unchain_marker (XMARKER (m)); | ||
| 3009 | XSETCAR (list, Qnil); | 3007 | XSETCAR (list, Qnil); |
| 3010 | } | 3008 | } |
| 3011 | } | 3009 | } |
| @@ -3069,8 +3067,8 @@ static Lisp_Object | |||
| 3069 | unwind_set_match_data (list) | 3067 | unwind_set_match_data (list) |
| 3070 | Lisp_Object list; | 3068 | Lisp_Object list; |
| 3071 | { | 3069 | { |
| 3072 | /* It is safe to free (evaporate) the markers immediately. */ | 3070 | /* It is NOT ALWAYS safe to free (evaporate) the markers immediately. */ |
| 3073 | return Fset_match_data (list, Qevaporate); | 3071 | return Fset_match_data (list, Qt); |
| 3074 | } | 3072 | } |
| 3075 | 3073 | ||
| 3076 | /* Called to unwind protect the match data. */ | 3074 | /* Called to unwind protect the match data. */ |