aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2007-10-09 08:52:57 +0000
committerMiles Bader2007-10-09 08:52:57 +0000
commit1af74d06e5bdafad9d629d2ed729c5d743cfaf0f (patch)
tree0360965ec0ad2736ffee01cce4f040c6b0a99133 /src
parenteceb3266a1f66a0034954aa82efbb20a5be959f8 (diff)
parent4b70e299ef66906fd285198003c72a1439d1f252 (diff)
downloademacs-1af74d06e5bdafad9d629d2ed729c5d743cfaf0f.tar.gz
emacs-1af74d06e5bdafad9d629d2ed729c5d743cfaf0f.zip
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-875
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog86
-rw-r--r--src/ChangeLog.10387
-rw-r--r--src/buffer.c2
-rw-r--r--src/eval.c13
-rw-r--r--src/fns.c2
-rw-r--r--src/frame.c17
-rw-r--r--src/frame.h7
-rw-r--r--src/keyboard.c17
-rw-r--r--src/keyboard.h3
-rw-r--r--src/macterm.c21
-rw-r--r--src/makefile.w32-in1
-rw-r--r--src/msdos.c8
-rw-r--r--src/s/hpux.h4
-rw-r--r--src/termhooks.h6
-rw-r--r--src/w32.c2
-rw-r--r--src/w32fns.c4
-rw-r--r--src/w32proc.c6
-rw-r--r--src/w32term.c8
-rw-r--r--src/xdisp.c29
-rw-r--r--src/xfaces.c4
-rw-r--r--src/xterm.c8
21 files changed, 605 insertions, 30 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6374b29aedc..4160a53e9d7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,85 @@
12007-10-08 Martin Rudalics <rudalics@gmx.at>
2
3 * keyboard.c (kbd_buffer_get_event): Break loop waiting for input
4 when there's an unread command event.
5
6 * frame.c (focus_follows_mouse): Moved here from frame.el to allow
7 window autoselection act appropriately when leaving selected frame.
8 (syms_of_frame): Initialize focus_follows_mouse.
9 * frame.h (focus_follows_mouse): Extern it.
10 * macterm.c (XTread_socket): When focus_follows_mouse is nil
11 make SELECT_WINDOW_EVENT only if we don't leave the selected
12 frame.
13 * msdos.c (dos_rawgetc): Likewise.
14 * w32term.c (w32_read_socket): Likewise.
15 * xterm.c (handle_one_xevent): Likewise.
16 * xdisp.c (syms_of_xdisp): In doc-string of
17 mouse-autoselect-window mention focus-follows-mouse.
18
192007-10-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20
21 * macterm.c (mac_load_query_font): Fix missing return value.
22 [USE_CG_DRAWING] (mac_define_fringe_bitmap, mac_destroy_fringe_bitmap):
23 Add BLOCK_INPUT.
24
252007-10-08 Richard Stallman <rms@gnu.org>
26
27 * xdisp.c (get_window_cursor_type): Implement documented behavior
28 for cursor-in-non-selected-windows = t.
29
302007-10-08 Jason Rumney <jasonr@gnu.org>
31
32 * w32.c (w32_get_resource): Always close registry keys.
33
342007-10-08 Jason Rumney <jasonr@gnu.org>
35
36 * makefile.w32-in (LIBS): Add COMCTL32.
37
38 * w32fns.c (globals_of_w32fns): Init common controls.
39
402007-10-08 Richard Stallman <rms@gnu.org>
41
42 * image.c (our_memory_buffer): Renamed from omfib_buffer.
43
442007-10-08 Richard Stallman <rms@gnu.org>
45
46 * buffer.c (Foverlays_at): Doc fix.
47
482007-10-08 Stefan Monnier <monnier@iro.umontreal.ca>
49
50 * fns.c (Fplist_put): Preserve uneven tail data.
51
522007-10-08 Peter O'Gorman <bug-gnu-emacs@mlists.thewrittenword.com> (tiny change)
53
54 * termhooks.h (enum event_kind): Remove trailing comma.
55
56 * frame.h (enum): Remove trailing comma.
57
582007-10-08 Dhuvra Krishnamurthy <dhuvrakm@gmail.com> (tiny change)
59
60 * w32proc.c (delete_child): Don't terminate threads of zombies.
61
622007-10-08 Martin Rudalics <rudalics@gmx.at>
63
64 * keyboard.h (struct kboard): New elt Vlast_repeatable_command.
65
66 * keyboard.c (syms_of_keyboard): Set up new Lisp variable
67 last-repeatable-command.
68 (init_kboard): Initialize Vlast_repeatable_command.
69 (command_loop_1): Set it to real_this_command unless that was
70 bound to an input event.
71 (mark_kboards): Mark it.
72
732007-10-08 Richard Stallman <rms@gnu.org>
74
75 * eval.c (condition-case): Doc fix.
76
772007-10-08 Masatake YAMATO <jet@gyve.org>
78
79 * xfaces.c (tty_supports_face_attributes_p): Fix code
80 for LFACE_INVERSE_INDEX and LFACE_BACKGROUND_INDEX; code
81 was copied and not edited.
82
12007-10-09 Stefan Monnier <monnier@iro.umontreal.ca> 832007-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
2 84
3 Add new `input-decode-map' keymap and use it for temrinal 85 Add new `input-decode-map' keymap and use it for temrinal
@@ -1622,6 +1704,10 @@
1622 customizable variable. Rather explicitly check whether the 1704 customizable variable. Rather explicitly check whether the
1623 height of the window that shall be splitted is at least as large 1705 height of the window that shall be splitted is at least as large
1624 as split_height_threshold. 1706 as split_height_threshold.
1707 (Fwindow_full_width_p): New defun.
1708 (syms_of_window): Defsubr it.
1709
1710 * window.h: Add EXFUN for Fwindow_full_width_p.
1625 1711
16262007-07-14 Jason Rumney <jasonr@gnu.org> 17122007-07-14 Jason Rumney <jasonr@gnu.org>
1627 1713
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index c5e7bc61e47..8dbf09269dc 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -1,4 +1,391 @@
1<<<<<<< TREE
12007-04-24 Chong Yidong <cyd@stupidchicken.com> 22007-04-24 Chong Yidong <cyd@stupidchicken.com>
3=======
42007-10-06 Martin Rudalics <rudalics@gmx.at>
5
6 * keyboard.c (kbd_buffer_get_event): Break loop waiting for input
7 when there's an unread command event.
8
9 * frame.c (focus_follows_mouse): Moved here from frame.el to allow
10 window autoselection act appropriately when leaving selected frame.
11 (syms_of_frame): Initialize focus_follows_mouse.
12 * frame.h (focus_follows_mouse): Extern it.
13 * macterm.c (XTread_socket): When focus_follows_mouse is nil
14 make SELECT_WINDOW_EVENT only if we don't leave the selected
15 frame.
16 * msdos.c (dos_rawgetc): Likewise.
17 * w32term.c (w32_read_socket): Likewise.
18 * xterm.c (handle_one_xevent): Likewise.
19 * xdisp.c (syms_of_xdisp): In doc-string of
20 mouse-autoselect-window mention focus-follows-mouse.
21
222007-10-06 Andreas Schwab <schwab@suse.de>
23
24 * fileio.c (Fwrite_region): Ignore EINVAL error from fsync.
25
262007-10-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
27
28 * macterm.c (mac_load_query_font): Fix missing return value.
29 [USE_CG_DRAWING] (mac_define_fringe_bitmap, mac_destroy_fringe_bitmap):
30 Add BLOCK_INPUT.
31
322007-10-04 Juanma Barranquero <lekktu@gmail.com>
33
34 * image.c (syms_of_image) <image-types>: Fix typo in docstring.
35
362007-10-02 Richard Stallman <rms@gnu.org>
37
38 * xdisp.c (get_window_cursor_type): Implement documented behavior
39 for cursor-in-non-selected-windows = t.
40
412007-10-01 Juanma Barranquero <lekktu@gmail.com>
42
43 * lread.c (Fload): Fix typo in docstring.
44
452007-09-29 Juri Linkov <juri@jurta.org>
46
47 * emacs.c (standard_args): Change priority of "--no-splash"
48 from 40 to 3. Add "--no-desktop" with the same priority.
49
502007-09-29 Jason Rumney <jasonr@gnu.org>
51
52 * w32.c (w32_get_resource): Always close registry keys.
53
542007-09-27 Jason Rumney <jasonr@gnu.org>
55
56 * makefile.w32-in (LIBS): Add COMCTL32.
57
58 * w32fns.c (globals_of_w32fns): Init common controls.
59
602007-09-21 Richard Stallman <rms@gnu.org>
61
62 * image.c (our_memory_buffer): Renamed from omfib_buffer.
63
642007-09-21 Juanma Barranquero <lekktu@gmail.com>
65
66 * w32term.c (x_draw_glyph_string): Use strike_through_color, not
67 underline_color, to draw strike-through.
68
692007-09-20 Glenn Morris <rgm@gnu.org>
70
71 * process.c (Fmake_network_process): Doc fix.
72
732007-09-19 Richard Stallman <rms@gnu.org>
74
75 * buffer.c (Foverlays_at): Doc fix.
76
772007-09-18 Stefan Monnier <monnier@iro.umontreal.ca>
78
79 * fns.c (Fplist_put): Preserve uneven tail data.
80
812007-09-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
82
83 * gtkutil.c (xg_get_image_for_pixmap): Always create a GdkPixbuf
84 when we have no file name for the icon.
85 (xg_tool_bar_expose_callback): Remove.
86 (xg_create_tool_bar): Don't connect expose signal to
87 xg_tool_bar_expose_callback.
88
892007-09-16 Andreas Schwab <schwab@suse.de>
90
91 * alloc.c (reset_malloc_hooks): Set the hooks to the previous
92 values instead of zapping them.
93
942007-09-15 Glenn Morris <rgm@gnu.org>
95
96 * s/hpux.h: No longer define `static' as nothing.
97
982007-09-14 Glenn Morris <rgm@gnu.org>
99
100 * fringe.c (init_fringe_bitmap) <swap nibble>: Move to file scope.
101 * gtkutil.c (xg_separator_p) <separator_names>: Move to file scope.
102 * image.c (our_memory_fill_input_buffer) <buffer>: Move to file
103 scope and rename to omfib_buffer for clarity.
104 (gif_load) <interlace_start, interlace_increment>: Move to file scope.
105
1062007-09-14 Peter O'Gorman <bug-gnu-emacs@mlists.thewrittenword.com> (tiny change)
107
108 * gtkutil.c (xg_get_file_with_chooser): Move GCPRO1 after declarations.
109
110 * termhooks.h (enum event_kind): Remove trailing comma.
111
112 * frame.h (enum): Remove trailing comma.
113
1142007-09-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
115
116 * keyboard.c, xterm.c, xfaces.c (abs): #undef before #define.
117
1182007-09-12 Glenn Morris <rgm@gnu.org>
119
120 * gtkutil.c (cnt): Rename to menu_grab_callback_cnt for clarity.
121 (menu_grab_callback): All uses changed.
122
123 * xselect.c (cnt): Rename to x_reply_selection_request_cnt for clarity.
124 (x_reply_selection_request): All uses changed.
125
1262007-09-06 Pixel <pixel@mandriva.com> (tiny change)
127
128 * image.c (gif_load): Fix bug: Handle nonexistent colormap.
129
1302007-09-06 Glenn Morris <rgm@gnu.org>
131
132 * gtkutil.c (menu_grab_callback) <cnt>:
133 * xselect.c (x_reply_selection_request) <cnt>: Move static
134 variable to file scope.
135
1362007-09-02 Dhuvra Krishnamurthy <dhuvrakm@gmail.com> (tiny change)
137
138 * w32proc.c (delete_child): Don't terminate threads of zombies.
139
1402007-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
141
142 * keyboard.c: Qrtl is new.
143 (parse_tool_bar_item): Handle :rtl keyword.
144 (syms_of_keyboard): Intern :rtl keyword.
145
146 * dispextern.h (enum tool_bar_item_idx): Add TOOL_BAR_ITEM_RTL_IMAGE.
147
148 * gtkutil.c (file_for_image, find_rtl_image): New functions.
149 (xg_get_image_for_pixmap): Use file_for_image
150 (update_frame_tool_bar): If direction is RTL, use RTL image if
151 defined. Use Gtk stock images or named theme icons if defined.
152
1532007-08-29 Martin Rudalics <rudalics@gmx.at>
154
155 * keyboard.h (struct kboard): New elt Vlast_repeatable_command.
156
157 * keyboard.c (syms_of_keyboard): Set up new Lisp variable
158 last-repeatable-command.
159 (init_kboard): Initialize Vlast_repeatable_command.
160 (command_loop_1): Set it to real_this_command unless that was
161 bound to an input event.
162 (mark_kboards): Mark it.
163
1642007-08-28 Juanma Barranquero <lekktu@gmail.com>
165
166 * image.c (syms_of_image) <image-library-alist, cross-disabled-images>:
167 Doc fixes.
168
1692007-08-28 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
170
171 * gtkutil.c (xg_tool_bar_expose_callback): Just do SET_FRAME_GARBAGED
172 so no Lisp code is executed.
173
1742007-08-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
175
176 * macterm.c (x_draw_composite_glyph_string_foreground): Draw rectangle
177 for nonexistent or zero-width glyph in composition glyph.
178
1792007-08-27 Richard Stallman <rms@gnu.org>
180
181 * eval.c (condition-case): Doc fix.
182
1832007-08-27 Masatake YAMATO <jet@gyve.org>
184
185 * xfaces.c (tty_supports_face_attributes_p): Fix code
186 for LFACE_INVERSE_INDEX and LFACE_BACKGROUND_INDEX; code
187 was copied and not edited.
188
1892007-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
190
191 * lread.c (load_warn_old_style_backquotes): Fix up array size typo.
192
1932007-08-22 Stefan Monnier <monnier@iro.umontreal.ca>
194
195 * lread.c (Qold_style_backquotes): New var.
196 (syms_of_lread): Init and staticpro it.
197 (load_warn_old_style_backquotes): New fun.
198 (Fload): Use them to warn about old style backquotes.
199 (end_of_file_error, Fload): Remove unused vars.
200
201 * lisp.h (Fclear_face_cache, Fx_send_client_event): Declare.
202
203 * lread.c (Vold_style_backquotes): New var.
204 (syms_of_lread): Init and export it to Elisp.
205 (read1): Set it when we find an old-style (back)quote.
206
2072007-08-22 Jason Rumney <jasonr@gnu.org>
208
209 * w32reg.c (SYSTEM_DEFAULT_RESOURCES): Add missing NULL terminator.
210
2112007-08-21 Stefan Monnier <monnier@iro.umontreal.ca>
212
213 * insdel.c (reset_var_on_error): New fun.
214 (signal_before_change, signal_after_change):
215 Use it to reset (after|before)-change-functions to nil in case of error.
216 Bind inhibit-modification-hooks to t.
217 Don't bind (after|before)-change-functions to nil while they run.
218
2192007-08-19 Andreas Schwab <schwab@suse.de>
220
221 * alloc.c (pure): Round PURESIZE up.
222
2232007-08-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
224
225 * xterm.c (handle_one_xevent): Remove check that mouse click is in
226 active frame.
227
2282007-08-15 Philippe Waroquiers <philippe.waroquiers@eurocontrol.int>
229
230 * term.c (tty_default_color_capabilities): Declare static
231 variables in file scope, to avoid HPUX compiler problem.
232
2332007-08-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
234
235 * gtkutil.c (update_frame_tool_bar): Use -1 as index
236 to gtk_toolbar_insert.
237
2382007-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
239
240 * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when
241 filling pixmap with stippled background.
242
2432007-08-10 Stefan Monnier <monnier@iro.umontreal.ca>
244
245 * print.c (new_backquote_output): Rename from old_backquote_output.
246 (print): Inverse its logic (according to its name) so as to match the
247 behavior of new_backquote_flag in lread.c.
248
2492007-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
250
251 * gmalloc.c (posix_memalign): New function.
252
2532007-08-08 Glenn Morris <rgm@gnu.org>
254
255 * Replace `iff' in doc-strings and comments.
256
2572007-08-07 Chong Yidong <cyd@stupidchicken.com>
258
259 * dispextern.h (struct image): New members.
260
261 * image.c: Sync to trunk version.
262 (search_image_cache, uncache_image, image-refresh): New functions.
263 Check for fg and bg colors.
264 (lookup_image): Use search_image_cache. Cache fg and bg colors.
265 (pbm_load): Another check for invalid image data.
266 (png_load): Ignore default background field.
267
268 * xdisp.c (move_it_by_lines): Remove incorrect optimization.
269
2702007-08-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
271
272 * gmalloc.c (__malloc_initialize): Remove pthread_once. Not needed.
273
2742007-08-07 Sam Steingold <sds@gnu.org>
275
276 * gmalloc.c (__morecore): Fix the declaration to comply with the
277 definition.
278
2792007-08-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
280
281 * emacs.c (main)
282 [HAVE_GTK_AND_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
283 Call malloc_enable_thread on interactive startup.
284
285 * gmalloc.c (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable.
286 (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS)
287 [USE_PTHREAD]: Conditionalize with it.
288 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
289 (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]:
290 New functions.
291
2922007-08-06 Chong Yidong <cyd@stupidchicken.com>
293
294 * xdisp.c (redisplay_window): When restoring original buffer
295 position, make sure it is still valid.
296
2972007-08-06 Martin Rudalics <rudalics@gmx.at>
298
299 * window.c (window_min_size_2): New function.
300 (window_min_size_1, size_window, Fdisplay_buffer)
301 (Fsplit_window, adjust_window_trailing_edge): Use it to avoid
302 windows without mode- or header-lines when window-min-height is
303 too small.
304 (size_window): Reset nodelete_p after testing it, following an
305 earlier note by Kim F. Storm.
306 (display_buffer): Do not set split_height_threshold to twice the
307 value of window_min_height to avoid changing the value of a
308 customizable variable. Rather explicitly check whether the
309 height of the window that shall be splitted is at least as large
310 as split_height_threshold.
311 (Fwindow_full_width_p): New defun.
312 (syms_of_window): Defsubr it.
313
314 * window.h: Add EXFUN for Fwindow_full_width_p.
315
3162007-08-06 Andreas Schwab <schwab@suse.de>
317
318 * window.c (Fdisplay_buffer): Use NILP.
319 (Fset_window_scroll_bars): Likewise.
320
3212007-08-03 Richard Stallman <rms@gnu.org>
322
323 * fileio.c (Fvisited_file_modtime): Use make_time.
324
3252007-08-01 Ryo Yoshitake <ryo@shiftmode.net> (tiny change)
326
327 * mac.c (init_mac_osx_environment): Adjust load-path on self-contained
328 build.
329
3302007-07-30 Stefan Monnier <monnier@iro.umontreal.ca>
331
332 * eval.c (init_eval_once): Bump max_lisp_eval_depth to 400.
333
3342007-07-25 Glenn Morris <rgm@gnu.org>
335
336 * Relicense all FSF files to GPLv3 or later.
337
338 * COPYING: Switch to GPLv3.
339
3402007-07-24 Jason Rumney <jasonr@gnu.org>
341
342 * w32fns.c (x_real_positions): Get real position from OS instead of
343 calculating it.
344
3452007-07-23 Jason Rumney <jasonr@gnu.org>
346
347 * filelock.c (current_lock_owner): Allow for @ sign in username.
348
3492007-07-20 Eli Zaretskii <eliz@gnu.org>
350
351 * makefile.w32-in (clean): Don't delete *~.
352
353 * w32proc.c (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32):
354 Define if not defined.
355
3562007-07-18 Jason Rumney <jasonr@gnu.org>
357
358 * w32proc.c (w32_executable_type): Handle 64 bit executables.
359
3602007-07-16 Juanma Barranquero <lekktu@gmail.com>
361
362 * coding.c (Ffind_operation_coding_system):
363 * eval.c (For, Fand, Fprogn):
364 * keyboard.c (Ftrack_mouse):
365 * print.c (Fwith_output_to_temp_buffer):
366 * window.c (Fsave_window_excursion): Doc fixes (some reported
367 by Johan Bockg,Ae(Brd).
368
3692007-07-15 Richard Stallman <rms@gnu.org>
370
371 * data.c (Fsetq_default): Doc fix.
372
373 * eval.c (Fsetq): Doc fix.
374
3752007-07-11 Jason Rumney <jasonr@gnu.org>
376
377 * makefile.w32-in (LIBS): Include OLE32.
378
379 * w32fns.c (w32_msg_pump) <WM_EMACS_CREATEWINDOW>: Initialize COM.
380 (w32_msg_pump) <WM_DESTROY>: Uninitialize COM.
381
3822007-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
383
384 * macterm.c [USE_MAC_TSM] (mac_handle_text_input_event):
385 Check WINDOWP before using XWINDOW.
386
3872007-06-27 Juanma Barranquero <lekktu@gmail.com>
388>>>>>>> MERGE-SOURCE
2 389
3 * Branch for 22.1. 390 * Branch for 22.1.
4 391
diff --git a/src/buffer.c b/src/buffer.c
index 3677ec671f2..ede5d9e1ce8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3968,7 +3968,7 @@ OVERLAY. */)
3968 3968
3969 3969
3970DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0, 3970DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
3971 doc: /* Return a list of the overlays that contain position POS. */) 3971 doc: /* Return a list of the overlays that contain the character at POS. */)
3972 (pos) 3972 (pos)
3973 Lisp_Object pos; 3973 Lisp_Object pos;
3974{ 3974{
diff --git a/src/eval.c b/src/eval.c
index 8a499ec3851..77abe5046db 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1355,14 +1355,15 @@ if CONDITION-NAME is one of the error's condition names.
1355If an error happens, the first applicable handler is run. 1355If an error happens, the first applicable handler is run.
1356 1356
1357The car of a handler may be a list of condition names 1357The car of a handler may be a list of condition names
1358instead of a single condition name. 1358instead of a single condition name. Then it handles all of them.
1359 1359
1360When a handler handles an error, 1360When a handler handles an error, control returns to the `condition-case'
1361control returns to the condition-case and the handler BODY... is executed 1361and it executes the handler's BODY...
1362with VAR bound to (SIGNALED-CONDITIONS . SIGNAL-DATA). 1362with VAR bound to (SIGNALED-CONDITIONS . SIGNAL-DATA) from the error.
1363VAR may be nil; then you do not get access to the signal information. 1363(If VAR is nil, the handler can't access that information.)
1364Then the value of the last BODY form is returned from the `condition-case'
1365expression.
1364 1366
1365The value of the last BODY form is returned from the condition-case.
1366See also the function `signal' for more info. 1367See also the function `signal' for more info.
1367usage: (condition-case VAR BODYFORM &rest HANDLERS) */) 1368usage: (condition-case VAR BODYFORM &rest HANDLERS) */)
1368 (args) 1369 (args)
diff --git a/src/fns.c b/src/fns.c
index 4c8693b3cca..f881ed53f88 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2060,7 +2060,7 @@ The PLIST is modified by side effects. */)
2060 prev = tail; 2060 prev = tail;
2061 QUIT; 2061 QUIT;
2062 } 2062 }
2063 newcell = Fcons (prop, Fcons (val, Qnil)); 2063 newcell = Fcons (prop, Fcons (val, NILP (prev) ? plist : XCDR (XCDR (prev))));
2064 if (NILP (prev)) 2064 if (NILP (prev))
2065 return newcell; 2065 return newcell;
2066 else 2066 else
diff --git a/src/frame.c b/src/frame.c
index 702596e2b98..3709b00dfd6 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -123,6 +123,8 @@ Lisp_Object Vdefault_frame_scroll_bars;
123Lisp_Object Vmouse_position_function; 123Lisp_Object Vmouse_position_function;
124Lisp_Object Vmouse_highlight; 124Lisp_Object Vmouse_highlight;
125Lisp_Object Vdelete_frame_functions; 125Lisp_Object Vdelete_frame_functions;
126
127int focus_follows_mouse;
126 128
127static void 129static void
128set_menu_bar_lines_1 (window, n) 130set_menu_bar_lines_1 (window, n)
@@ -4492,6 +4494,21 @@ displayed.
4492 4494
4493This variable is local to the current terminal and cannot be buffer-local. */); 4495This variable is local to the current terminal and cannot be buffer-local. */);
4494 4496
4497 DEFVAR_BOOL ("focus-follows-mouse", &focus_follows_mouse,
4498 doc: /* Non-nil if window system changes focus when you move the mouse.
4499You should set this variable to tell Emacs how your window manager
4500handles focus, since there is no way in general for Emacs to find out
4501automatically. */);
4502#ifdef HAVE_WINDOW_SYSTEM
4503#if defined(HAVE_NTGUI) || defined(MAC_OS)
4504 focus_follows_mouse = 0;
4505#else
4506 focus_follows_mouse = 1;
4507#endif
4508#else
4509 focus_follows_mouse = 0;
4510#endif
4511
4495 staticpro (&Vframe_list); 4512 staticpro (&Vframe_list);
4496 4513
4497 defsubr (&Sactive_minibuffer_window); 4514 defsubr (&Sactive_minibuffer_window);
diff --git a/src/frame.h b/src/frame.h
index 30a0b931cc3..7c058d569aa 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -37,6 +37,11 @@ extern int frame_garbaged;
37 37
38extern int message_buf_print; 38extern int message_buf_print;
39 39
40/* Nonzero means window system changes focus when moving the
41 mouse. */
42
43extern int focus_follows_mouse;
44
40 45
41/* The structure representing a frame. */ 46/* The structure representing a frame. */
42 47
@@ -1030,7 +1035,7 @@ enum
1030 FULLSCREEN_WIDTH = 1, 1035 FULLSCREEN_WIDTH = 1,
1031 FULLSCREEN_HEIGHT = 2, 1036 FULLSCREEN_HEIGHT = 2,
1032 FULLSCREEN_BOTH = 3, 1037 FULLSCREEN_BOTH = 3,
1033 FULLSCREEN_WAIT = 4, 1038 FULLSCREEN_WAIT = 4
1034}; 1039};
1035 1040
1036 1041
diff --git a/src/keyboard.c b/src/keyboard.c
index 9068f944664..5824042e663 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1612,6 +1612,8 @@ command_loop_1 ()
1612 /* Do this after running Vpost_command_hook, for consistency. */ 1612 /* Do this after running Vpost_command_hook, for consistency. */
1613 current_kboard->Vlast_command = Vthis_command; 1613 current_kboard->Vlast_command = Vthis_command;
1614 current_kboard->Vreal_last_command = real_this_command; 1614 current_kboard->Vreal_last_command = real_this_command;
1615 if (!CONSP (last_command_char))
1616 current_kboard->Vlast_repeatable_command = real_this_command;
1615 1617
1616 while (1) 1618 while (1)
1617 { 1619 {
@@ -1987,6 +1989,8 @@ command_loop_1 ()
1987 { 1989 {
1988 current_kboard->Vlast_command = Vthis_command; 1990 current_kboard->Vlast_command = Vthis_command;
1989 current_kboard->Vreal_last_command = real_this_command; 1991 current_kboard->Vreal_last_command = real_this_command;
1992 if (!CONSP (last_command_char))
1993 current_kboard->Vlast_repeatable_command = real_this_command;
1990 cancel_echoing (); 1994 cancel_echoing ();
1991 this_command_key_count = 0; 1995 this_command_key_count = 0;
1992 this_command_key_count_reset = 0; 1996 this_command_key_count_reset = 0;
@@ -4098,6 +4102,12 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
4098 /* Wait until there is input available. */ 4102 /* Wait until there is input available. */
4099 for (;;) 4103 for (;;)
4100 { 4104 {
4105 /* Break loop if there's an unread command event. Needed in
4106 moused window autoselection which uses a timer to insert such
4107 events. */
4108 if (CONSP (Vunread_command_events))
4109 break;
4110
4101 if (kbd_fetch_ptr != kbd_store_ptr) 4111 if (kbd_fetch_ptr != kbd_store_ptr)
4102 break; 4112 break;
4103#if defined (HAVE_MOUSE) || defined (HAVE_GPM) 4113#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
@@ -11483,6 +11493,7 @@ init_kboard (kb)
11483 kb->Vlast_command = Qnil; 11493 kb->Vlast_command = Qnil;
11484 kb->Vreal_last_command = Qnil; 11494 kb->Vreal_last_command = Qnil;
11485 kb->Vkeyboard_translate_table = Qnil; 11495 kb->Vkeyboard_translate_table = Qnil;
11496 kb->Vlast_repeatable_command = Qnil;
11486 kb->Vprefix_arg = Qnil; 11497 kb->Vprefix_arg = Qnil;
11487 kb->Vlast_prefix_arg = Qnil; 11498 kb->Vlast_prefix_arg = Qnil;
11488 kb->kbd_queue = Qnil; 11499 kb->kbd_queue = Qnil;
@@ -11990,6 +12001,11 @@ See Info node `(elisp)Multiple displays'. */);
11990 DEFVAR_KBOARD ("real-last-command", Vreal_last_command, 12001 DEFVAR_KBOARD ("real-last-command", Vreal_last_command,
11991 doc: /* Same as `last-command', but never altered by Lisp code. */); 12002 doc: /* Same as `last-command', but never altered by Lisp code. */);
11992 12003
12004 DEFVAR_KBOARD ("last-repeatable-command", Vlast_repeatable_command,
12005 doc: /* Last command that may be repeated.
12006The last command executed that was not bound to an input event.
12007This is the command `repeat' will try to repeat. */);
12008
11993 DEFVAR_LISP ("this-command", &Vthis_command, 12009 DEFVAR_LISP ("this-command", &Vthis_command,
11994 doc: /* The command now being executed. 12010 doc: /* The command now being executed.
11995The command can set this variable; whatever is put here 12011The command can set this variable; whatever is put here
@@ -12461,6 +12477,7 @@ mark_kboards ()
12461 mark_object (kb->Vlast_command); 12477 mark_object (kb->Vlast_command);
12462 mark_object (kb->Vreal_last_command); 12478 mark_object (kb->Vreal_last_command);
12463 mark_object (kb->Vkeyboard_translate_table); 12479 mark_object (kb->Vkeyboard_translate_table);
12480 mark_object (kb->Vlast_repeatable_command);
12464 mark_object (kb->Vprefix_arg); 12481 mark_object (kb->Vprefix_arg);
12465 mark_object (kb->Vlast_prefix_arg); 12482 mark_object (kb->Vlast_prefix_arg);
12466 mark_object (kb->kbd_queue); 12483 mark_object (kb->kbd_queue);
diff --git a/src/keyboard.h b/src/keyboard.h
index 2e50c4c5f1f..ae135b30b77 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -87,6 +87,9 @@ struct kboard
87 /* User-supplied table to translate input characters through. */ 87 /* User-supplied table to translate input characters through. */
88 Lisp_Object Vkeyboard_translate_table; 88 Lisp_Object Vkeyboard_translate_table;
89 89
90 /* Last command that may be repeated by `repeat'. */
91 Lisp_Object Vlast_repeatable_command;
92
90 /* The prefix argument for the next command, in raw form. */ 93 /* The prefix argument for the next command, in raw form. */
91 Lisp_Object Vprefix_arg; 94 Lisp_Object Vprefix_arg;
92 95
diff --git a/src/macterm.c b/src/macterm.c
index f14193a2d56..bfd7dca2c3b 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -2360,6 +2360,9 @@ mac_define_fringe_bitmap (which, bits, h, wd)
2360 2360
2361 for (i = 0; i < h; i++) 2361 for (i = 0; i < h; i++)
2362 bits[i] = ~bits[i]; 2362 bits[i] = ~bits[i];
2363
2364 BLOCK_INPUT;
2365
2363 provider = CGDataProviderCreateWithData (NULL, bits, 2366 provider = CGDataProviderCreateWithData (NULL, bits,
2364 sizeof (unsigned short) * h, NULL); 2367 sizeof (unsigned short) * h, NULL);
2365 if (provider) 2368 if (provider)
@@ -2369,6 +2372,8 @@ mac_define_fringe_bitmap (which, bits, h, wd)
2369 provider, NULL, 0); 2372 provider, NULL, 0);
2370 CGDataProviderRelease (provider); 2373 CGDataProviderRelease (provider);
2371 } 2374 }
2375
2376 UNBLOCK_INPUT;
2372} 2377}
2373 2378
2374static void 2379static void
@@ -2379,7 +2384,11 @@ mac_destroy_fringe_bitmap (which)
2379 return; 2384 return;
2380 2385
2381 if (fringe_bmp[which]) 2386 if (fringe_bmp[which])
2382 CGImageRelease (fringe_bmp[which]); 2387 {
2388 BLOCK_INPUT;
2389 CGImageRelease (fringe_bmp[which]);
2390 UNBLOCK_INPUT;
2391 }
2383 fringe_bmp[which] = 0; 2392 fringe_bmp[which] = 0;
2384} 2393}
2385#endif 2394#endif
@@ -8757,7 +8766,7 @@ mac_load_query_font (f, fontname)
8757 8766
8758 font_id = atsu_find_font_from_family_name (family); 8767 font_id = atsu_find_font_from_family_name (family);
8759 if (font_id == kATSUInvalidFontID) 8768 if (font_id == kATSUInvalidFontID)
8760 return; 8769 return NULL;
8761 size_fixed = Long2Fix (size); 8770 size_fixed = Long2Fix (size);
8762 bold_p = (fontface & bold) != 0; 8771 bold_p = (fontface & bold) != 0;
8763 italic_p = (fontface & italic) != 0; 8772 italic_p = (fontface & italic) != 0;
@@ -12148,7 +12157,13 @@ XTread_socket (sd, expected, hold_quit)
12148 will be selected only when it is active. */ 12157 will be selected only when it is active. */
12149 if (WINDOWP (window) 12158 if (WINDOWP (window)
12150 && !EQ (window, last_window) 12159 && !EQ (window, last_window)
12151 && !EQ (window, selected_window)) 12160 && !EQ (window, selected_window)
12161 /* For click-to-focus window managers
12162 create event iff we don't leave the
12163 selected frame. */
12164 && (focus_follows_mouse
12165 || (EQ (XWINDOW (window)->frame,
12166 XWINDOW (selected_window)->frame))))
12152 { 12167 {
12153 inev.kind = SELECT_WINDOW_EVENT; 12168 inev.kind = SELECT_WINDOW_EVENT;
12154 inev.frame_or_window = window; 12169 inev.frame_or_window = window;
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index d1ac66f7771..dd70de6fea1 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -148,6 +148,7 @@ LIBS = $(TLIB0) \
148 $(SHELL32) \ 148 $(SHELL32) \
149 $(WINSPOOL) \ 149 $(WINSPOOL) \
150 $(OLE32) \ 150 $(OLE32) \
151 $(COMCTL32) \
151 $(libc) 152 $(libc)
152 153
153# 154#
diff --git a/src/msdos.c b/src/msdos.c
index fc14be2705c..dc183def753 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -3393,7 +3393,13 @@ dos_rawgetc ()
3393 it is active. */ 3393 it is active. */
3394 if (WINDOWP (mouse_window) 3394 if (WINDOWP (mouse_window)
3395 && !EQ (mouse_window, last_mouse_window) 3395 && !EQ (mouse_window, last_mouse_window)
3396 && !EQ (mouse_window, selected_window)) 3396 && !EQ (window, selected_window)
3397 /* For click-to-focus window managers
3398 create event iff we don't leave the
3399 selected frame. */
3400 && (focus_follows_mouse
3401 || (EQ (XWINDOW (window)->frame,
3402 XWINDOW (selected_window)->frame))))
3397 { 3403 {
3398 event.kind = SELECT_WINDOW_EVENT; 3404 event.kind = SELECT_WINDOW_EVENT;
3399 event.frame_or_window = mouse_window; 3405 event.frame_or_window = mouse_window;
diff --git a/src/s/hpux.h b/src/s/hpux.h
index 1fb83a7a075..62427ba98a6 100644
--- a/src/s/hpux.h
+++ b/src/s/hpux.h
@@ -173,7 +173,9 @@ Boston, MA 02110-1301, USA. */
173 longer needed. Try uncommenting the following if you have problems 173 longer needed. Try uncommenting the following if you have problems
174 on older versions. */ 174 on older versions. */
175 175
176/*#define static */ 176/* This is unnecessary in HPUX versions 10.20, 11.0, 11.11, 11.23. */
177
178/* #define static */
177 179
178/* Define extra libraries to load. 180/* Define extra libraries to load.
179 This should have -lBSD, but that library is said to make 181 This should have -lBSD, but that library is said to make
diff --git a/src/termhooks.h b/src/termhooks.h
index 7f58114c219..4d8fb8a861b 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -185,7 +185,7 @@ enum event_kind
185 185
186 /* Queued from XTread_socket when session manager sends 186 /* Queued from XTread_socket when session manager sends
187 save yourself before shutdown. */ 187 save yourself before shutdown. */
188 SAVE_SESSION_EVENT, 188 SAVE_SESSION_EVENT
189 189
190#ifdef MAC_OS 190#ifdef MAC_OS
191 /* Generated when an Apple event, a HICommand event, or a Services 191 /* Generated when an Apple event, a HICommand event, or a Services
@@ -194,11 +194,11 @@ enum event_kind
194 symbols, respectively. Member `arg' is a Lisp object converted 194 symbols, respectively. Member `arg' is a Lisp object converted
195 from the received Apple event. Parameters for non-Apple events 195 from the received Apple event. Parameters for non-Apple events
196 are converted to those in Apple events. */ 196 are converted to those in Apple events. */
197 MAC_APPLE_EVENT, 197 , MAC_APPLE_EVENT
198#endif 198#endif
199 199
200#ifdef HAVE_GPM 200#ifdef HAVE_GPM
201 GPM_CLICK_EVENT 201 , GPM_CLICK_EVENT
202#endif 202#endif
203}; 203};
204 204
diff --git a/src/w32.c b/src/w32.c
index dd87ef62fab..500e85733b2 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -927,6 +927,7 @@ w32_get_resource (key, lpdwtype)
927 && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL 927 && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
928 && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS) 928 && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
929 { 929 {
930 RegCloseKey (hrootkey);
930 return (lpvalue); 931 return (lpvalue);
931 } 932 }
932 933
@@ -943,6 +944,7 @@ w32_get_resource (key, lpdwtype)
943 && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL 944 && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
944 && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS) 945 && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
945 { 946 {
947 RegCloseKey (hrootkey);
946 return (lpvalue); 948 return (lpvalue);
947 } 949 }
948 950
diff --git a/src/w32fns.c b/src/w32fns.c
index f4637be249b..aca888f8b2c 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -48,6 +48,7 @@ Boston, MA 02110-1301, USA. */
48 48
49#include "bitmaps/gray.xbm" 49#include "bitmaps/gray.xbm"
50 50
51#include <commctrl.h>
51#include <commdlg.h> 52#include <commdlg.h>
52#include <shellapi.h> 53#include <shellapi.h>
53#include <ctype.h> 54#include <ctype.h>
@@ -9100,6 +9101,9 @@ void globals_of_w32fns ()
9100 &w32_ansi_code_page, 9101 &w32_ansi_code_page,
9101 doc: /* The ANSI code page used by the system. */); 9102 doc: /* The ANSI code page used by the system. */);
9102 w32_ansi_code_page = GetACP (); 9103 w32_ansi_code_page = GetACP ();
9104
9105 /* MessageBox does not work without this when linked to comctl32.dll 6.0. */
9106 InitCommonControls ();
9103} 9107}
9104 9108
9105#undef abort 9109#undef abort
diff --git a/src/w32proc.c b/src/w32proc.c
index adf5152f267..c21d589c525 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -216,12 +216,18 @@ delete_child (child_process *cp)
216 /* let the thread exit cleanly if possible */ 216 /* let the thread exit cleanly if possible */
217 cp->status = STATUS_READ_ERROR; 217 cp->status = STATUS_READ_ERROR;
218 SetEvent (cp->char_consumed); 218 SetEvent (cp->char_consumed);
219#if 0
220 /* We used to forceably terminate the thread here, but it
221 is normally unnecessary, and in abnormal cases, the worst that
222 will happen is we have an extra idle thread hanging around
223 waiting for the zombie process. */
219 if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0) 224 if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0)
220 { 225 {
221 DebPrint (("delete_child.WaitForSingleObject (thread) failed " 226 DebPrint (("delete_child.WaitForSingleObject (thread) failed "
222 "with %lu for fd %ld\n", GetLastError (), cp->fd)); 227 "with %lu for fd %ld\n", GetLastError (), cp->fd));
223 TerminateThread (cp->thrd, 0); 228 TerminateThread (cp->thrd, 0);
224 } 229 }
230#endif
225 } 231 }
226 CloseHandle (cp->thrd); 232 CloseHandle (cp->thrd);
227 cp->thrd = NULL; 233 cp->thrd = NULL;
diff --git a/src/w32term.c b/src/w32term.c
index 0eab8f31b98..f46a54fafb9 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4380,7 +4380,13 @@ w32_read_socket (sd, expected, hold_quit)
4380 only when it is active. */ 4380 only when it is active. */
4381 if (WINDOWP(window) 4381 if (WINDOWP(window)
4382 && !EQ (window, last_window) 4382 && !EQ (window, last_window)
4383 && !EQ (window, selected_window)) 4383 && !EQ (window, selected_window)
4384 /* For click-to-focus window managers
4385 create event iff we don't leave the
4386 selected frame. */
4387 && (focus_follows_mouse
4388 || (EQ (XWINDOW (window)->frame,
4389 XWINDOW (selected_window)->frame))))
4384 { 4390 {
4385 inev.kind = SELECT_WINDOW_EVENT; 4391 inev.kind = SELECT_WINDOW_EVENT;
4386 inev.frame_or_window = window; 4392 inev.frame_or_window = window;
diff --git a/src/xdisp.c b/src/xdisp.c
index a592bfa05b7..da254bc11bd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21355,7 +21355,7 @@ get_window_cursor_type (w, glyph, width, active_cursor)
21355 non_selected = 1; 21355 non_selected = 1;
21356 } 21356 }
21357 21357
21358 /* Nonselected window or nonselected frame. */ 21358 /* Detect a nonselected window or nonselected frame. */
21359 else if (w != XWINDOW (f->selected_window) 21359 else if (w != XWINDOW (f->selected_window)
21360#ifdef HAVE_WINDOW_SYSTEM 21360#ifdef HAVE_WINDOW_SYSTEM
21361 || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame 21361 || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame
@@ -21374,13 +21374,6 @@ get_window_cursor_type (w, glyph, width, active_cursor)
21374 if (NILP (b->cursor_type)) 21374 if (NILP (b->cursor_type))
21375 return NO_CURSOR; 21375 return NO_CURSOR;
21376 21376
21377 /* Use cursor-in-non-selected-windows for non-selected window or frame. */
21378 if (non_selected)
21379 {
21380 alt_cursor = b->cursor_in_non_selected_windows;
21381 return get_specified_cursor_type (alt_cursor, width);
21382 }
21383
21384 /* Get the normal cursor type for this window. */ 21377 /* Get the normal cursor type for this window. */
21385 if (EQ (b->cursor_type, Qt)) 21378 if (EQ (b->cursor_type, Qt))
21386 { 21379 {
@@ -21390,6 +21383,21 @@ get_window_cursor_type (w, glyph, width, active_cursor)
21390 else 21383 else
21391 cursor_type = get_specified_cursor_type (b->cursor_type, width); 21384 cursor_type = get_specified_cursor_type (b->cursor_type, width);
21392 21385
21386 /* Use cursor-in-non-selected-windows instead
21387 for non-selected window or frame. */
21388 if (non_selected)
21389 {
21390 alt_cursor = b->cursor_in_non_selected_windows;
21391 if (!EQ (Qt, alt_cursor))
21392 return get_specified_cursor_type (alt_cursor, width);
21393 /* t means modify the normal cursor type. */
21394 if (cursor_type == FILLED_BOX_CURSOR)
21395 cursor_type = HOLLOW_BOX_CURSOR;
21396 else if (cursor_type == BAR_CURSOR && *width > 1)
21397 --*width;
21398 return cursor_type;
21399 }
21400
21393 /* Use normal cursor if not blinked off. */ 21401 /* Use normal cursor if not blinked off. */
21394 if (!w->cursor_off_p) 21402 if (!w->cursor_off_p)
21395 { 21403 {
@@ -24194,7 +24202,10 @@ Any other value means to autoselect window instantaneously when the
24194mouse pointer enters it. 24202mouse pointer enters it.
24195 24203
24196Autoselection selects the minibuffer only if it is active, and never 24204Autoselection selects the minibuffer only if it is active, and never
24197unselects the minibuffer if it is active. */); 24205unselects the minibuffer if it is active.
24206
24207When customizing this variable make sure that the actual value of
24208`focus-follows-mouse' matches the behavior of your window manager. */);
24198 Vmouse_autoselect_window = Qnil; 24209 Vmouse_autoselect_window = Qnil;
24199 24210
24200 DEFVAR_LISP ("auto-resize-tool-bars", &Vauto_resize_tool_bars, 24211 DEFVAR_LISP ("auto-resize-tool-bars", &Vauto_resize_tool_bars,
diff --git a/src/xfaces.c b/src/xfaces.c
index 01ac364589f..eb45d1eb3ea 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6085,7 +6085,7 @@ tty_supports_face_attributes_p (f, attrs, def_face)
6085 val = attrs[LFACE_INVERSE_INDEX]; 6085 val = attrs[LFACE_INVERSE_INDEX];
6086 if (!UNSPECIFIEDP (val)) 6086 if (!UNSPECIFIEDP (val))
6087 { 6087 {
6088 if (face_attr_equal_p (val, def_attrs[LFACE_UNDERLINE_INDEX])) 6088 if (face_attr_equal_p (val, def_attrs[LFACE_INVERSE_INDEX]))
6089 return 0; /* same as default */ 6089 return 0; /* same as default */
6090 else 6090 else
6091 test_caps |= TTY_CAP_INVERSE; 6091 test_caps |= TTY_CAP_INVERSE;
@@ -6128,7 +6128,7 @@ tty_supports_face_attributes_p (f, attrs, def_face)
6128 bg = attrs[LFACE_BACKGROUND_INDEX]; 6128 bg = attrs[LFACE_BACKGROUND_INDEX];
6129 if (STRINGP (bg)) 6129 if (STRINGP (bg))
6130 { 6130 {
6131 Lisp_Object def_bg = def_attrs[LFACE_FOREGROUND_INDEX]; 6131 Lisp_Object def_bg = def_attrs[LFACE_BACKGROUND_INDEX];
6132 6132
6133 if (face_attr_equal_p (bg, def_bg)) 6133 if (face_attr_equal_p (bg, def_bg))
6134 return 0; /* same as default */ 6134 return 0; /* same as default */
diff --git a/src/xterm.c b/src/xterm.c
index 0b6504bd232..5a5d4e42d8b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6715,7 +6715,13 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6715 will be selected only when it is active. */ 6715 will be selected only when it is active. */
6716 if (WINDOWP (window) 6716 if (WINDOWP (window)
6717 && !EQ (window, last_window) 6717 && !EQ (window, last_window)
6718 && !EQ (window, selected_window)) 6718 && !EQ (window, selected_window)
6719 /* For click-to-focus window managers
6720 create event iff we don't leave the
6721 selected frame. */
6722 && (focus_follows_mouse
6723 || (EQ (XWINDOW (window)->frame,
6724 XWINDOW (selected_window)->frame))))
6719 { 6725 {
6720 inev.ie.kind = SELECT_WINDOW_EVENT; 6726 inev.ie.kind = SELECT_WINDOW_EVENT;
6721 inev.ie.frame_or_window = window; 6727 inev.ie.frame_or_window = window;