# HG changeset patch # User Stefan Monnier # Date 1195251361 0 # Node ID fc388b33b46d23a57cc6fd78e8982261a4b61015 # Parent 19465bdfa2ae34effa14be3afe59ecd848fadd88 (Fset_match_data): Remove the `evaporate' feature. (unwind_set_match_data): Don't use the `evaporate' feature. diff -r 19465bdfa2ae -r fc388b33b46d src/ChangeLog --- a/src/ChangeLog Fri Nov 16 18:23:20 2007 +0000 +++ b/src/ChangeLog Fri Nov 16 22:16:01 2007 +0000 @@ -1,7 +1,12 @@ +2007-11-16 Stefan Monnier + + * search.c (Fset_match_data): Remove the `evaporate' feature. + (unwind_set_match_data): Don't use the `evaporate' feature. + 2007-11-15 Andreas Schwab - * editfns.c (Fformat): Correctly format EMACS_INT values. Also - take precision into account when formatting an integer. + * editfns.c (Fformat): Correctly format EMACS_INT values. + Also take precision into account when formatting an integer. 2007-11-15 Juanma Barranquero diff -r 19465bdfa2ae -r fc388b33b46d src/search.c --- a/src/search.c Fri Nov 16 18:23:20 2007 +0000 +++ b/src/search.c Fri Nov 16 22:16:01 2007 +0000 @@ -2892,11 +2892,15 @@ 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. */ +/* We used to have an internal use variant of `reseat' described as: + + 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. + + But it was ill-conceived: those supposedly-internal markers get exposed via + the undo-list, so freeing them here is unsafe. */ 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. @@ -2981,10 +2985,7 @@ if (!NILP (reseat) && MARKERP (m)) { - if (EQ (reseat, Qevaporate)) - free_marker (m); - else - unchain_marker (XMARKER (m)); + unchain_marker (XMARKER (m)); XSETCAR (list, Qnil); } @@ -3002,10 +3003,7 @@ if (!NILP (reseat) && MARKERP (m)) { - if (EQ (reseat, Qevaporate)) - free_marker (m); - else - unchain_marker (XMARKER (m)); + unchain_marker (XMARKER (m)); XSETCAR (list, Qnil); } } @@ -3069,8 +3067,8 @@ unwind_set_match_data (list) Lisp_Object list; { - /* It is safe to free (evaporate) the markers immediately. */ - return Fset_match_data (list, Qevaporate); + /* It is NOT ALWAYS safe to free (evaporate) the markers immediately. */ + return Fset_match_data (list, Qt); } /* Called to unwind protect the match data. */