summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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 @@
+2007-10-08 Martin Rudalics <rudalics@gmx.at>
+
+ * keyboard.c (kbd_buffer_get_event): Break loop waiting for input
+ when there's an unread command event.
+
+ * frame.c (focus_follows_mouse): Moved here from frame.el to allow
+ window autoselection act appropriately when leaving selected frame.
+ (syms_of_frame): Initialize focus_follows_mouse.
+ * frame.h (focus_follows_mouse): Extern it.
+ * macterm.c (XTread_socket): When focus_follows_mouse is nil
+ make SELECT_WINDOW_EVENT only if we don't leave the selected
+ frame.
+ * msdos.c (dos_rawgetc): Likewise.
+ * w32term.c (w32_read_socket): Likewise.
+ * xterm.c (handle_one_xevent): Likewise.
+ * xdisp.c (syms_of_xdisp): In doc-string of
+ mouse-autoselect-window mention focus-follows-mouse.
+
+2007-10-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * macterm.c (mac_load_query_font): Fix missing return value.
+ [USE_CG_DRAWING] (mac_define_fringe_bitmap, mac_destroy_fringe_bitmap):
+ Add BLOCK_INPUT.
+
+2007-10-08 Richard Stallman <rms@gnu.org>
+
+ * xdisp.c (get_window_cursor_type): Implement documented behavior
+ for cursor-in-non-selected-windows = t.
+
+2007-10-08 Jason Rumney <jasonr@gnu.org>
+
+ * w32.c (w32_get_resource): Always close registry keys.
+
+2007-10-08 Jason Rumney <jasonr@gnu.org>
+
+ * makefile.w32-in (LIBS): Add COMCTL32.
+
+ * w32fns.c (globals_of_w32fns): Init common controls.
+
+2007-10-08 Richard Stallman <rms@gnu.org>
+
+ * image.c (our_memory_buffer): Renamed from omfib_buffer.
+
+2007-10-08 Richard Stallman <rms@gnu.org>
+
+ * buffer.c (Foverlays_at): Doc fix.
+
+2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * fns.c (Fplist_put): Preserve uneven tail data.
+
+2007-10-08 Peter O'Gorman <bug-gnu-emacs@mlists.thewrittenword.com> (tiny change)
+
+ * termhooks.h (enum event_kind): Remove trailing comma.
+
+ * frame.h (enum): Remove trailing comma.
+
+2007-10-08 Dhuvra Krishnamurthy <dhuvrakm@gmail.com> (tiny change)
+
+ * w32proc.c (delete_child): Don't terminate threads of zombies.
+
+2007-10-08 Martin Rudalics <rudalics@gmx.at>
+
+ * keyboard.h (struct kboard): New elt Vlast_repeatable_command.
+
+ * keyboard.c (syms_of_keyboard): Set up new Lisp variable
+ last-repeatable-command.
+ (init_kboard): Initialize Vlast_repeatable_command.
+ (command_loop_1): Set it to real_this_command unless that was
+ bound to an input event.
+ (mark_kboards): Mark it.
+
+2007-10-08 Richard Stallman <rms@gnu.org>
+
+ * eval.c (condition-case): Doc fix.
+
+2007-10-08 Masatake YAMATO <jet@gyve.org>
+
+ * xfaces.c (tty_supports_face_attributes_p): Fix code
+ for LFACE_INVERSE_INDEX and LFACE_BACKGROUND_INDEX; code
+ was copied and not edited.
+
2007-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
Add new `input-decode-map' keymap and use it for temrinal
@@ -1622,6 +1704,10 @@
customizable variable. Rather explicitly check whether the
height of the window that shall be splitted is at least as large
as split_height_threshold.
+ (Fwindow_full_width_p): New defun.
+ (syms_of_window): Defsubr it.
+
+ * window.h: Add EXFUN for Fwindow_full_width_p.
2007-07-14 Jason Rumney <jasonr@gnu.org>
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 @@
+<<<<<<< TREE
2007-04-24 Chong Yidong <cyd@stupidchicken.com>
+=======
+2007-10-06 Martin Rudalics <rudalics@gmx.at>
+
+ * keyboard.c (kbd_buffer_get_event): Break loop waiting for input
+ when there's an unread command event.
+
+ * frame.c (focus_follows_mouse): Moved here from frame.el to allow
+ window autoselection act appropriately when leaving selected frame.
+ (syms_of_frame): Initialize focus_follows_mouse.
+ * frame.h (focus_follows_mouse): Extern it.
+ * macterm.c (XTread_socket): When focus_follows_mouse is nil
+ make SELECT_WINDOW_EVENT only if we don't leave the selected
+ frame.
+ * msdos.c (dos_rawgetc): Likewise.
+ * w32term.c (w32_read_socket): Likewise.
+ * xterm.c (handle_one_xevent): Likewise.
+ * xdisp.c (syms_of_xdisp): In doc-string of
+ mouse-autoselect-window mention focus-follows-mouse.
+
+2007-10-06 Andreas Schwab <schwab@suse.de>
+
+ * fileio.c (Fwrite_region): Ignore EINVAL error from fsync.
+
+2007-10-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * macterm.c (mac_load_query_font): Fix missing return value.
+ [USE_CG_DRAWING] (mac_define_fringe_bitmap, mac_destroy_fringe_bitmap):
+ Add BLOCK_INPUT.
+
+2007-10-04 Juanma Barranquero <lekktu@gmail.com>
+
+ * image.c (syms_of_image) <image-types>: Fix typo in docstring.
+
+2007-10-02 Richard Stallman <rms@gnu.org>
+
+ * xdisp.c (get_window_cursor_type): Implement documented behavior
+ for cursor-in-non-selected-windows = t.
+
+2007-10-01 Juanma Barranquero <lekktu@gmail.com>
+
+ * lread.c (Fload): Fix typo in docstring.
+
+2007-09-29 Juri Linkov <juri@jurta.org>
+
+ * emacs.c (standard_args): Change priority of "--no-splash"
+ from 40 to 3. Add "--no-desktop" with the same priority.
+
+2007-09-29 Jason Rumney <jasonr@gnu.org>
+
+ * w32.c (w32_get_resource): Always close registry keys.
+
+2007-09-27 Jason Rumney <jasonr@gnu.org>
+
+ * makefile.w32-in (LIBS): Add COMCTL32.
+
+ * w32fns.c (globals_of_w32fns): Init common controls.
+
+2007-09-21 Richard Stallman <rms@gnu.org>
+
+ * image.c (our_memory_buffer): Renamed from omfib_buffer.
+
+2007-09-21 Juanma Barranquero <lekktu@gmail.com>
+
+ * w32term.c (x_draw_glyph_string): Use strike_through_color, not
+ underline_color, to draw strike-through.
+
+2007-09-20 Glenn Morris <rgm@gnu.org>
+
+ * process.c (Fmake_network_process): Doc fix.
+
+2007-09-19 Richard Stallman <rms@gnu.org>
+
+ * buffer.c (Foverlays_at): Doc fix.
+
+2007-09-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * fns.c (Fplist_put): Preserve uneven tail data.
+
+2007-09-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (xg_get_image_for_pixmap): Always create a GdkPixbuf
+ when we have no file name for the icon.
+ (xg_tool_bar_expose_callback): Remove.
+ (xg_create_tool_bar): Don't connect expose signal to
+ xg_tool_bar_expose_callback.
+
+2007-09-16 Andreas Schwab <schwab@suse.de>
+
+ * alloc.c (reset_malloc_hooks): Set the hooks to the previous
+ values instead of zapping them.
+
+2007-09-15 Glenn Morris <rgm@gnu.org>
+
+ * s/hpux.h: No longer define `static' as nothing.
+
+2007-09-14 Glenn Morris <rgm@gnu.org>
+
+ * fringe.c (init_fringe_bitmap) <swap nibble>: Move to file scope.
+ * gtkutil.c (xg_separator_p) <separator_names>: Move to file scope.
+ * image.c (our_memory_fill_input_buffer) <buffer>: Move to file
+ scope and rename to omfib_buffer for clarity.
+ (gif_load) <interlace_start, interlace_increment>: Move to file scope.
+
+2007-09-14 Peter O'Gorman <bug-gnu-emacs@mlists.thewrittenword.com> (tiny change)
+
+ * gtkutil.c (xg_get_file_with_chooser): Move GCPRO1 after declarations.
+
+ * termhooks.h (enum event_kind): Remove trailing comma.
+
+ * frame.h (enum): Remove trailing comma.
+
+2007-09-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * keyboard.c, xterm.c, xfaces.c (abs): #undef before #define.
+
+2007-09-12 Glenn Morris <rgm@gnu.org>
+
+ * gtkutil.c (cnt): Rename to menu_grab_callback_cnt for clarity.
+ (menu_grab_callback): All uses changed.
+
+ * xselect.c (cnt): Rename to x_reply_selection_request_cnt for clarity.
+ (x_reply_selection_request): All uses changed.
+
+2007-09-06 Pixel <pixel@mandriva.com> (tiny change)
+
+ * image.c (gif_load): Fix bug: Handle nonexistent colormap.
+
+2007-09-06 Glenn Morris <rgm@gnu.org>
+
+ * gtkutil.c (menu_grab_callback) <cnt>:
+ * xselect.c (x_reply_selection_request) <cnt>: Move static
+ variable to file scope.
+
+2007-09-02 Dhuvra Krishnamurthy <dhuvrakm@gmail.com> (tiny change)
+
+ * w32proc.c (delete_child): Don't terminate threads of zombies.
+
+2007-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * keyboard.c: Qrtl is new.
+ (parse_tool_bar_item): Handle :rtl keyword.
+ (syms_of_keyboard): Intern :rtl keyword.
+
+ * dispextern.h (enum tool_bar_item_idx): Add TOOL_BAR_ITEM_RTL_IMAGE.
+
+ * gtkutil.c (file_for_image, find_rtl_image): New functions.
+ (xg_get_image_for_pixmap): Use file_for_image
+ (update_frame_tool_bar): If direction is RTL, use RTL image if
+ defined. Use Gtk stock images or named theme icons if defined.
+
+2007-08-29 Martin Rudalics <rudalics@gmx.at>
+
+ * keyboard.h (struct kboard): New elt Vlast_repeatable_command.
+
+ * keyboard.c (syms_of_keyboard): Set up new Lisp variable
+ last-repeatable-command.
+ (init_kboard): Initialize Vlast_repeatable_command.
+ (command_loop_1): Set it to real_this_command unless that was
+ bound to an input event.
+ (mark_kboards): Mark it.
+
+2007-08-28 Juanma Barranquero <lekktu@gmail.com>
+
+ * image.c (syms_of_image) <image-library-alist, cross-disabled-images>:
+ Doc fixes.
+
+2007-08-28 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (xg_tool_bar_expose_callback): Just do SET_FRAME_GARBAGED
+ so no Lisp code is executed.
+
+2007-08-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * macterm.c (x_draw_composite_glyph_string_foreground): Draw rectangle
+ for nonexistent or zero-width glyph in composition glyph.
+
+2007-08-27 Richard Stallman <rms@gnu.org>
+
+ * eval.c (condition-case): Doc fix.
+
+2007-08-27 Masatake YAMATO <jet@gyve.org>
+
+ * xfaces.c (tty_supports_face_attributes_p): Fix code
+ for LFACE_INVERSE_INDEX and LFACE_BACKGROUND_INDEX; code
+ was copied and not edited.
+
+2007-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lread.c (load_warn_old_style_backquotes): Fix up array size typo.
+
+2007-08-22 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lread.c (Qold_style_backquotes): New var.
+ (syms_of_lread): Init and staticpro it.
+ (load_warn_old_style_backquotes): New fun.
+ (Fload): Use them to warn about old style backquotes.
+ (end_of_file_error, Fload): Remove unused vars.
+
+ * lisp.h (Fclear_face_cache, Fx_send_client_event): Declare.
+
+ * lread.c (Vold_style_backquotes): New var.
+ (syms_of_lread): Init and export it to Elisp.
+ (read1): Set it when we find an old-style (back)quote.
+
+2007-08-22 Jason Rumney <jasonr@gnu.org>
+
+ * w32reg.c (SYSTEM_DEFAULT_RESOURCES): Add missing NULL terminator.
+
+2007-08-21 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * insdel.c (reset_var_on_error): New fun.
+ (signal_before_change, signal_after_change):
+ Use it to reset (after|before)-change-functions to nil in case of error.
+ Bind inhibit-modification-hooks to t.
+ Don't bind (after|before)-change-functions to nil while they run.
+
+2007-08-19 Andreas Schwab <schwab@suse.de>
+
+ * alloc.c (pure): Round PURESIZE up.
+
+2007-08-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * xterm.c (handle_one_xevent): Remove check that mouse click is in
+ active frame.
+
+2007-08-15 Philippe Waroquiers <philippe.waroquiers@eurocontrol.int>
+
+ * term.c (tty_default_color_capabilities): Declare static
+ variables in file scope, to avoid HPUX compiler problem.
+
+2007-08-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (update_frame_tool_bar): Use -1 as index
+ to gtk_toolbar_insert.
+
+2007-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when
+ filling pixmap with stippled background.
+
+2007-08-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * print.c (new_backquote_output): Rename from old_backquote_output.
+ (print): Inverse its logic (according to its name) so as to match the
+ behavior of new_backquote_flag in lread.c.
+
+2007-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * gmalloc.c (posix_memalign): New function.
+
+2007-08-08 Glenn Morris <rgm@gnu.org>
+
+ * Replace `iff' in doc-strings and comments.
+
+2007-08-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * dispextern.h (struct image): New members.
+
+ * image.c: Sync to trunk version.
+ (search_image_cache, uncache_image, image-refresh): New functions.
+ Check for fg and bg colors.
+ (lookup_image): Use search_image_cache. Cache fg and bg colors.
+ (pbm_load): Another check for invalid image data.
+ (png_load): Ignore default background field.
+
+ * xdisp.c (move_it_by_lines): Remove incorrect optimization.
+
+2007-08-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * gmalloc.c (__malloc_initialize): Remove pthread_once. Not needed.
+
+2007-08-07 Sam Steingold <sds@gnu.org>
+
+ * gmalloc.c (__morecore): Fix the declaration to comply with the
+ definition.
+
+2007-08-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * emacs.c (main)
+ [HAVE_GTK_AND_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
+ Call malloc_enable_thread on interactive startup.
+
+ * gmalloc.c (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable.
+ (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS)
+ [USE_PTHREAD]: Conditionalize with it.
+ (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
+ (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]:
+ New functions.
+
+2007-08-06 Chong Yidong <cyd@stupidchicken.com>
+
+ * xdisp.c (redisplay_window): When restoring original buffer
+ position, make sure it is still valid.
+
+2007-08-06 Martin Rudalics <rudalics@gmx.at>
+
+ * window.c (window_min_size_2): New function.
+ (window_min_size_1, size_window, Fdisplay_buffer)
+ (Fsplit_window, adjust_window_trailing_edge): Use it to avoid
+ windows without mode- or header-lines when window-min-height is
+ too small.
+ (size_window): Reset nodelete_p after testing it, following an
+ earlier note by Kim F. Storm.
+ (display_buffer): Do not set split_height_threshold to twice the
+ value of window_min_height to avoid changing the value of a
+ customizable variable. Rather explicitly check whether the
+ height of the window that shall be splitted is at least as large
+ as split_height_threshold.
+ (Fwindow_full_width_p): New defun.
+ (syms_of_window): Defsubr it.
+
+ * window.h: Add EXFUN for Fwindow_full_width_p.
+
+2007-08-06 Andreas Schwab <schwab@suse.de>
+
+ * window.c (Fdisplay_buffer): Use NILP.
+ (Fset_window_scroll_bars): Likewise.
+
+2007-08-03 Richard Stallman <rms@gnu.org>
+
+ * fileio.c (Fvisited_file_modtime): Use make_time.
+
+2007-08-01 Ryo Yoshitake <ryo@shiftmode.net> (tiny change)
+
+ * mac.c (init_mac_osx_environment): Adjust load-path on self-contained
+ build.
+
+2007-07-30 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * eval.c (init_eval_once): Bump max_lisp_eval_depth to 400.
+
+2007-07-25 Glenn Morris <rgm@gnu.org>
+
+ * Relicense all FSF files to GPLv3 or later.
+
+ * COPYING: Switch to GPLv3.
+
+2007-07-24 Jason Rumney <jasonr@gnu.org>
+
+ * w32fns.c (x_real_positions): Get real position from OS instead of
+ calculating it.
+
+2007-07-23 Jason Rumney <jasonr@gnu.org>
+
+ * filelock.c (current_lock_owner): Allow for @ sign in username.
+
+2007-07-20 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in (clean): Don't delete *~.
+
+ * w32proc.c (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32):
+ Define if not defined.
+
+2007-07-18 Jason Rumney <jasonr@gnu.org>
+
+ * w32proc.c (w32_executable_type): Handle 64 bit executables.
+
+2007-07-16 Juanma Barranquero <lekktu@gmail.com>
+
+ * coding.c (Ffind_operation_coding_system):
+ * eval.c (For, Fand, Fprogn):
+ * keyboard.c (Ftrack_mouse):
+ * print.c (Fwith_output_to_temp_buffer):
+ * window.c (Fsave_window_excursion): Doc fixes (some reported
+ by Johan Bockg,Ae(Brd).
+
+2007-07-15 Richard Stallman <rms@gnu.org>
+
+ * data.c (Fsetq_default): Doc fix.
+
+ * eval.c (Fsetq): Doc fix.
+
+2007-07-11 Jason Rumney <jasonr@gnu.org>
+
+ * makefile.w32-in (LIBS): Include OLE32.
+
+ * w32fns.c (w32_msg_pump) <WM_EMACS_CREATEWINDOW>: Initialize COM.
+ (w32_msg_pump) <WM_DESTROY>: Uninitialize COM.
+
+2007-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * macterm.c [USE_MAC_TSM] (mac_handle_text_input_event):
+ Check WINDOWP before using XWINDOW.
+
+2007-06-27 Juanma Barranquero <lekktu@gmail.com>
+>>>>>>> MERGE-SOURCE
* Branch for 22.1.
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. */)
DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
- doc: /* Return a list of the overlays that contain position POS. */)
+ doc: /* Return a list of the overlays that contain the character at POS. */)
(pos)
Lisp_Object pos;
{
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.
If an error happens, the first applicable handler is run.
The car of a handler may be a list of condition names
-instead of a single condition name.
+instead of a single condition name. Then it handles all of them.
-When a handler handles an error,
-control returns to the condition-case and the handler BODY... is executed
-with VAR bound to (SIGNALED-CONDITIONS . SIGNAL-DATA).
-VAR may be nil; then you do not get access to the signal information.
+When a handler handles an error, control returns to the `condition-case'
+and it executes the handler's BODY...
+with VAR bound to (SIGNALED-CONDITIONS . SIGNAL-DATA) from the error.
+(If VAR is nil, the handler can't access that information.)
+Then the value of the last BODY form is returned from the `condition-case'
+expression.
-The value of the last BODY form is returned from the condition-case.
See also the function `signal' for more info.
usage: (condition-case VAR BODYFORM &rest HANDLERS) */)
(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. */)
prev = tail;
QUIT;
}
- newcell = Fcons (prop, Fcons (val, Qnil));
+ newcell = Fcons (prop, Fcons (val, NILP (prev) ? plist : XCDR (XCDR (prev))));
if (NILP (prev))
return newcell;
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;
Lisp_Object Vmouse_position_function;
Lisp_Object Vmouse_highlight;
Lisp_Object Vdelete_frame_functions;
+
+int focus_follows_mouse;
static void
set_menu_bar_lines_1 (window, n)
@@ -4492,6 +4494,21 @@ displayed.
This variable is local to the current terminal and cannot be buffer-local. */);
+ DEFVAR_BOOL ("focus-follows-mouse", &focus_follows_mouse,
+ doc: /* Non-nil if window system changes focus when you move the mouse.
+You should set this variable to tell Emacs how your window manager
+handles focus, since there is no way in general for Emacs to find out
+automatically. */);
+#ifdef HAVE_WINDOW_SYSTEM
+#if defined(HAVE_NTGUI) || defined(MAC_OS)
+ focus_follows_mouse = 0;
+#else
+ focus_follows_mouse = 1;
+#endif
+#else
+ focus_follows_mouse = 0;
+#endif
+
staticpro (&Vframe_list);
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;
extern int message_buf_print;
+/* Nonzero means window system changes focus when moving the
+ mouse. */
+
+extern int focus_follows_mouse;
+
/* The structure representing a frame. */
@@ -1030,7 +1035,7 @@ enum
FULLSCREEN_WIDTH = 1,
FULLSCREEN_HEIGHT = 2,
FULLSCREEN_BOTH = 3,
- FULLSCREEN_WAIT = 4,
+ FULLSCREEN_WAIT = 4
};
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 ()
/* Do this after running Vpost_command_hook, for consistency. */
current_kboard->Vlast_command = Vthis_command;
current_kboard->Vreal_last_command = real_this_command;
+ if (!CONSP (last_command_char))
+ current_kboard->Vlast_repeatable_command = real_this_command;
while (1)
{
@@ -1987,6 +1989,8 @@ command_loop_1 ()
{
current_kboard->Vlast_command = Vthis_command;
current_kboard->Vreal_last_command = real_this_command;
+ if (!CONSP (last_command_char))
+ current_kboard->Vlast_repeatable_command = real_this_command;
cancel_echoing ();
this_command_key_count = 0;
this_command_key_count_reset = 0;
@@ -4098,6 +4102,12 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
/* Wait until there is input available. */
for (;;)
{
+ /* Break loop if there's an unread command event. Needed in
+ moused window autoselection which uses a timer to insert such
+ events. */
+ if (CONSP (Vunread_command_events))
+ break;
+
if (kbd_fetch_ptr != kbd_store_ptr)
break;
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
@@ -11483,6 +11493,7 @@ init_kboard (kb)
kb->Vlast_command = Qnil;
kb->Vreal_last_command = Qnil;
kb->Vkeyboard_translate_table = Qnil;
+ kb->Vlast_repeatable_command = Qnil;
kb->Vprefix_arg = Qnil;
kb->Vlast_prefix_arg = Qnil;
kb->kbd_queue = Qnil;
@@ -11990,6 +12001,11 @@ See Info node `(elisp)Multiple displays'. */);
DEFVAR_KBOARD ("real-last-command", Vreal_last_command,
doc: /* Same as `last-command', but never altered by Lisp code. */);
+ DEFVAR_KBOARD ("last-repeatable-command", Vlast_repeatable_command,
+ doc: /* Last command that may be repeated.
+The last command executed that was not bound to an input event.
+This is the command `repeat' will try to repeat. */);
+
DEFVAR_LISP ("this-command", &Vthis_command,
doc: /* The command now being executed.
The command can set this variable; whatever is put here
@@ -12461,6 +12477,7 @@ mark_kboards ()
mark_object (kb->Vlast_command);
mark_object (kb->Vreal_last_command);
mark_object (kb->Vkeyboard_translate_table);
+ mark_object (kb->Vlast_repeatable_command);
mark_object (kb->Vprefix_arg);
mark_object (kb->Vlast_prefix_arg);
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
/* User-supplied table to translate input characters through. */
Lisp_Object Vkeyboard_translate_table;
+ /* Last command that may be repeated by `repeat'. */
+ Lisp_Object Vlast_repeatable_command;
+
/* The prefix argument for the next command, in raw form. */
Lisp_Object Vprefix_arg;
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)
for (i = 0; i < h; i++)
bits[i] = ~bits[i];
+
+ BLOCK_INPUT;
+
provider = CGDataProviderCreateWithData (NULL, bits,
sizeof (unsigned short) * h, NULL);
if (provider)
@@ -2369,6 +2372,8 @@ mac_define_fringe_bitmap (which, bits, h, wd)
provider, NULL, 0);
CGDataProviderRelease (provider);
}
+
+ UNBLOCK_INPUT;
}
static void
@@ -2379,7 +2384,11 @@ mac_destroy_fringe_bitmap (which)
return;
if (fringe_bmp[which])
- CGImageRelease (fringe_bmp[which]);
+ {
+ BLOCK_INPUT;
+ CGImageRelease (fringe_bmp[which]);
+ UNBLOCK_INPUT;
+ }
fringe_bmp[which] = 0;
}
#endif
@@ -8757,7 +8766,7 @@ mac_load_query_font (f, fontname)
font_id = atsu_find_font_from_family_name (family);
if (font_id == kATSUInvalidFontID)
- return;
+ return NULL;
size_fixed = Long2Fix (size);
bold_p = (fontface & bold) != 0;
italic_p = (fontface & italic) != 0;
@@ -12148,7 +12157,13 @@ XTread_socket (sd, expected, hold_quit)
will be selected only when it is active. */
if (WINDOWP (window)
&& !EQ (window, last_window)
- && !EQ (window, selected_window))
+ && !EQ (window, selected_window)
+ /* For click-to-focus window managers
+ create event iff we don't leave the
+ selected frame. */
+ && (focus_follows_mouse
+ || (EQ (XWINDOW (window)->frame,
+ XWINDOW (selected_window)->frame))))
{
inev.kind = SELECT_WINDOW_EVENT;
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) \
$(SHELL32) \
$(WINSPOOL) \
$(OLE32) \
+ $(COMCTL32) \
$(libc)
#
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 ()
it is active. */
if (WINDOWP (mouse_window)
&& !EQ (mouse_window, last_mouse_window)
- && !EQ (mouse_window, selected_window))
+ && !EQ (window, selected_window)
+ /* For click-to-focus window managers
+ create event iff we don't leave the
+ selected frame. */
+ && (focus_follows_mouse
+ || (EQ (XWINDOW (window)->frame,
+ XWINDOW (selected_window)->frame))))
{
event.kind = SELECT_WINDOW_EVENT;
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. */
longer needed. Try uncommenting the following if you have problems
on older versions. */
-/*#define static */
+/* This is unnecessary in HPUX versions 10.20, 11.0, 11.11, 11.23. */
+
+/* #define static */
/* Define extra libraries to load.
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
/* Queued from XTread_socket when session manager sends
save yourself before shutdown. */
- SAVE_SESSION_EVENT,
+ SAVE_SESSION_EVENT
#ifdef MAC_OS
/* Generated when an Apple event, a HICommand event, or a Services
@@ -194,11 +194,11 @@ enum event_kind
symbols, respectively. Member `arg' is a Lisp object converted
from the received Apple event. Parameters for non-Apple events
are converted to those in Apple events. */
- MAC_APPLE_EVENT,
+ , MAC_APPLE_EVENT
#endif
#ifdef HAVE_GPM
- GPM_CLICK_EVENT
+ , GPM_CLICK_EVENT
#endif
};
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)
&& (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
&& RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
{
+ RegCloseKey (hrootkey);
return (lpvalue);
}
@@ -943,6 +944,7 @@ w32_get_resource (key, lpdwtype)
&& (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL
&& RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
{
+ RegCloseKey (hrootkey);
return (lpvalue);
}
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. */
#include "bitmaps/gray.xbm"
+#include <commctrl.h>
#include <commdlg.h>
#include <shellapi.h>
#include <ctype.h>
@@ -9100,6 +9101,9 @@ void globals_of_w32fns ()
&w32_ansi_code_page,
doc: /* The ANSI code page used by the system. */);
w32_ansi_code_page = GetACP ();
+
+ /* MessageBox does not work without this when linked to comctl32.dll 6.0. */
+ InitCommonControls ();
}
#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)
/* let the thread exit cleanly if possible */
cp->status = STATUS_READ_ERROR;
SetEvent (cp->char_consumed);
+#if 0
+ /* We used to forceably terminate the thread here, but it
+ is normally unnecessary, and in abnormal cases, the worst that
+ will happen is we have an extra idle thread hanging around
+ waiting for the zombie process. */
if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0)
{
DebPrint (("delete_child.WaitForSingleObject (thread) failed "
"with %lu for fd %ld\n", GetLastError (), cp->fd));
TerminateThread (cp->thrd, 0);
}
+#endif
}
CloseHandle (cp->thrd);
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)
only when it is active. */
if (WINDOWP(window)
&& !EQ (window, last_window)
- && !EQ (window, selected_window))
+ && !EQ (window, selected_window)
+ /* For click-to-focus window managers
+ create event iff we don't leave the
+ selected frame. */
+ && (focus_follows_mouse
+ || (EQ (XWINDOW (window)->frame,
+ XWINDOW (selected_window)->frame))))
{
inev.kind = SELECT_WINDOW_EVENT;
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)
non_selected = 1;
}
- /* Nonselected window or nonselected frame. */
+ /* Detect a nonselected window or nonselected frame. */
else if (w != XWINDOW (f->selected_window)
#ifdef HAVE_WINDOW_SYSTEM
|| f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame
@@ -21374,13 +21374,6 @@ get_window_cursor_type (w, glyph, width, active_cursor)
if (NILP (b->cursor_type))
return NO_CURSOR;
- /* Use cursor-in-non-selected-windows for non-selected window or frame. */
- if (non_selected)
- {
- alt_cursor = b->cursor_in_non_selected_windows;
- return get_specified_cursor_type (alt_cursor, width);
- }
-
/* Get the normal cursor type for this window. */
if (EQ (b->cursor_type, Qt))
{
@@ -21390,6 +21383,21 @@ get_window_cursor_type (w, glyph, width, active_cursor)
else
cursor_type = get_specified_cursor_type (b->cursor_type, width);
+ /* Use cursor-in-non-selected-windows instead
+ for non-selected window or frame. */
+ if (non_selected)
+ {
+ alt_cursor = b->cursor_in_non_selected_windows;
+ if (!EQ (Qt, alt_cursor))
+ return get_specified_cursor_type (alt_cursor, width);
+ /* t means modify the normal cursor type. */
+ if (cursor_type == FILLED_BOX_CURSOR)
+ cursor_type = HOLLOW_BOX_CURSOR;
+ else if (cursor_type == BAR_CURSOR && *width > 1)
+ --*width;
+ return cursor_type;
+ }
+
/* Use normal cursor if not blinked off. */
if (!w->cursor_off_p)
{
@@ -24194,7 +24202,10 @@ Any other value means to autoselect window instantaneously when the
mouse pointer enters it.
Autoselection selects the minibuffer only if it is active, and never
-unselects the minibuffer if it is active. */);
+unselects the minibuffer if it is active.
+
+When customizing this variable make sure that the actual value of
+`focus-follows-mouse' matches the behavior of your window manager. */);
Vmouse_autoselect_window = Qnil;
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)
val = attrs[LFACE_INVERSE_INDEX];
if (!UNSPECIFIEDP (val))
{
- if (face_attr_equal_p (val, def_attrs[LFACE_UNDERLINE_INDEX]))
+ if (face_attr_equal_p (val, def_attrs[LFACE_INVERSE_INDEX]))
return 0; /* same as default */
else
test_caps |= TTY_CAP_INVERSE;
@@ -6128,7 +6128,7 @@ tty_supports_face_attributes_p (f, attrs, def_face)
bg = attrs[LFACE_BACKGROUND_INDEX];
if (STRINGP (bg))
{
- Lisp_Object def_bg = def_attrs[LFACE_FOREGROUND_INDEX];
+ Lisp_Object def_bg = def_attrs[LFACE_BACKGROUND_INDEX];
if (face_attr_equal_p (bg, def_bg))
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)
will be selected only when it is active. */
if (WINDOWP (window)
&& !EQ (window, last_window)
- && !EQ (window, selected_window))
+ && !EQ (window, selected_window)
+ /* For click-to-focus window managers
+ create event iff we don't leave the
+ selected frame. */
+ && (focus_follows_mouse
+ || (EQ (XWINDOW (window)->frame,
+ XWINDOW (selected_window)->frame))))
{
inev.ie.kind = SELECT_WINDOW_EVENT;
inev.ie.frame_or_window = window;