summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-11-21 04:55:58 +0000
committerMiles Bader <miles@gnu.org>2007-11-21 04:55:58 +0000
commitd4aa48db8ed36b1fc7e7b0e6bd35049353f7f96e (patch)
tree4a8c1381059835b73876f59183e228a2fb740d59 /src
parent3d9bd2bc2806ecaf85f4474060a7fadfd00e61fd (diff)
parent33127d1a78f2a37d68ffa09642df2f38d78e95b1 (diff)
downloademacs-d4aa48db8ed36b1fc7e7b0e6bd35049353f7f96e.tar.gz
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-937
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/ChangeLog.102
-rw-r--r--src/search.c28
-rw-r--r--src/w32bdf.c4
4 files changed, 26 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8b6b11b39fa..9f99493e668 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
2007-11-21 Jason Rumney <jasonr@gnu.org>
+ * w32bdf.c (w32_init_bdf_font, w32_BDF_to_x_font): CreateFileMapping
+ returns NULL on failure.
+
+2007-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * search.c (Fset_match_data): Remove the `evaporate' feature.
+ (unwind_set_match_data): Don't use the `evaporate' feature.
+
+2007-11-21 Jason Rumney <jasonr@gnu.org>
+
* dispnew.c (init_display) [WINDOWSNT]: Hardcode terminal_type.
* w32console.c (w32con_write_glyphs): Remove unused variables.
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index c5e7bc61e47..b7187263257 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -3016,7 +3016,7 @@
* w32.c: Fix high cpu load for server sockets.
(pfn_WSAEventSelect): New function ptr.
(init_winsock): Load it.
- (sys_listen): Set FILE_LISTEN flag. Set event mask for socket's
+ (sys_listen): Set FILE_LISTEN flag. Set event mask for socket's
char_avail event object to FD_ACCEPT.
(sys_accept): Check FILE_LISTEN flag. Set event mask on new
socket's char_avail event object to FD_READ|FD_CLOSE.
diff --git a/src/search.c b/src/search.c
index aca95c03308..29def81c3eb 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2964,11 +2964,15 @@ Return value is undefined if the last search failed. */)
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.
@@ -3053,10 +3057,7 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
if (!NILP (reseat) && MARKERP (m))
{
- if (EQ (reseat, Qevaporate))
- free_marker (m);
- else
- unchain_marker (XMARKER (m));
+ unchain_marker (XMARKER (m));
XSETCAR (list, Qnil);
}
@@ -3074,10 +3075,7 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
if (!NILP (reseat) && MARKERP (m))
{
- if (EQ (reseat, Qevaporate))
- free_marker (m);
- else
- unchain_marker (XMARKER (m));
+ unchain_marker (XMARKER (m));
XSETCAR (list, Qnil);
}
}
@@ -3141,8 +3139,8 @@ static Lisp_Object
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. */
diff --git a/src/w32bdf.c b/src/w32bdf.c
index 80ef098d8de..4a12b1f0190 100644
--- a/src/w32bdf.c
+++ b/src/w32bdf.c
@@ -261,7 +261,7 @@ w32_init_bdf_font(char *filename)
error("Fail to open BDF file");
}
hfilemap = CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL);
- if (hfilemap == INVALID_HANDLE_VALUE)
+ if (!hfilemap)
{
CloseHandle(hfile);
error("Can't map font");
@@ -828,7 +828,7 @@ int w32_BDF_to_x_font (char *file, char* xstr, int len)
size = fileinfo.nFileSizeLow;
hfilemap = CreateFileMapping (hfile, NULL, PAGE_READONLY, 0, 0, NULL);
- if (hfilemap == INVALID_HANDLE_VALUE)
+ if (!hfilemap)
{
CloseHandle (hfile);
return 0;