[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/search.c,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/search.c,v |
Date: |
Wed, 21 Nov 2007 04:55:59 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 07/11/21 04:55:58
Index: src/search.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/search.c,v
retrieving revision 1.226
retrieving revision 1.227
diff -u -b -r1.226 -r1.227
--- src/search.c 12 Sep 2007 07:22:20 -0000 1.226
+++ src/search.c 21 Nov 2007 04:55:53 -0000 1.227
@@ -2964,11 +2964,15 @@
return reuse;
}
-/* Internal usage only:
+/* 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. */
+ 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.
@@ -3053,9 +3057,6 @@
if (!NILP (reseat) && MARKERP (m))
{
- if (EQ (reseat, Qevaporate))
- free_marker (m);
- else
unchain_marker (XMARKER (m));
XSETCAR (list, Qnil);
}
@@ -3074,9 +3075,6 @@
if (!NILP (reseat) && MARKERP (m))
{
- if (EQ (reseat, Qevaporate))
- free_marker (m);
- else
unchain_marker (XMARKER (m));
XSETCAR (list, Qnil);
}
@@ -3141,8 +3139,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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/search.c,v,
Miles Bader <=