diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2006-09-08 14:14:28 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2006-09-08 14:14:28 +0000 |
commit | 92b2332318a23f84c60088380d4c0ea07e17d1bb (patch) | |
tree | 427c440538eb722838203447ecdf6ce00e18a031 | |
parent | ecc0a2ceccaaaec5d63eeb105b200d513215434b (diff) | |
download | emacs-92b2332318a23f84c60088380d4c0ea07e17d1bb.tar.gz |
* xdisp.c (mouse_autoselect_window): Removed.
(Vmouse_autoselect_window): New variable. DEFVAR_LISP it.
* dispextern.h (mouse_autoselect_window): Remove extern.
(Vmouse_autoselect_window): Add extern.
* macterm.c (XTread_socket): Test Vmouse_autoselect_window
instead of mouse_autoselect_window.
* msdos.c (dos_rawgetc): Likewise.
* w32term.c (w32_read_socket): Likewise.
* xterm.c (handle_one_xevent): Likewise.
-rw-r--r-- | src/ChangeLog | 17 | ||||
-rw-r--r-- | src/dispextern.h | 2 | ||||
-rw-r--r-- | src/macterm.c | 2 | ||||
-rw-r--r-- | src/msdos.c | 2 | ||||
-rw-r--r-- | src/w32term.c | 2 | ||||
-rw-r--r-- | src/xdisp.c | 23 | ||||
-rw-r--r-- | src/xterm.c | 2 |
7 files changed, 40 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f8a9f26d891..b57aab2882f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2006-08-27 Martin Rudalics <rudalics@gmx.at> + + * xdisp.c (mouse_autoselect_window): Removed. + (Vmouse_autoselect_window): New variable. DEFVAR_LISP it. + + * dispextern.h (mouse_autoselect_window): Remove extern. + (Vmouse_autoselect_window): Add extern. + + * macterm.c (XTread_socket): Test Vmouse_autoselect_window + instead of mouse_autoselect_window. + + * msdos.c (dos_rawgetc): Likewise. + + * w32term.c (w32_read_socket): Likewise. + + * xterm.c (handle_one_xevent): Likewise. + 2006-09-08 Richard Stallman <rms@gnu.org> * xdisp.c (Vmenu_updating_frame): Define here. diff --git a/src/dispextern.h b/src/dispextern.h index 6aff0dc1803..09a0c2dae89 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2690,7 +2690,7 @@ extern Lisp_Object help_echo_object, previous_help_echo_string; extern int help_echo_pos; extern struct frame *last_mouse_frame; extern int last_tool_bar_item; -extern int mouse_autoselect_window; +extern Lisp_Object Vmouse_autoselect_window; extern int unibyte_display_via_language_environment; extern void reseat_at_previous_visible_line_start P_ ((struct it *)); diff --git a/src/macterm.c b/src/macterm.c index dcfa61e0ac3..98c311ff02e 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -10653,7 +10653,7 @@ XTread_socket (sd, expected, hold_quit) else { /* Generate SELECT_WINDOW_EVENTs when needed. */ - if (mouse_autoselect_window) + if (!NILP (Vmouse_autoselect_window)) { Lisp_Object window; diff --git a/src/msdos.c b/src/msdos.c index 2068af544ac..61e167a1946 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -3381,7 +3381,7 @@ dos_rawgetc () } /* Generate SELECT_WINDOW_EVENTs when needed. */ - if (mouse_autoselect_window) + if (!NILP (Vmouse_autoselect_window)) { mouse_window = window_from_coordinates (SELECTED_FRAME(), mouse_last_x, diff --git a/src/w32term.c b/src/w32term.c index 93a697bbd8c..c00fdb8923c 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4298,7 +4298,7 @@ w32_read_socket (sd, expected, hold_quit) if (f) { /* Generate SELECT_WINDOW_EVENTs when needed. */ - if (mouse_autoselect_window) + if (!NILP (Vmouse_autoselect_window)) { Lisp_Object window; int x = LOWORD (msg.msg.lParam); diff --git a/src/xdisp.c b/src/xdisp.c index 16dbc533557..0a516c39768 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -256,9 +256,9 @@ Lisp_Object list_of_error; Lisp_Object Vfontification_functions; Lisp_Object Qfontification_functions; -/* Non-zero means automatically select any window when the mouse +/* Non-nil means automatically select any window when the mouse cursor moves into it. */ -int mouse_autoselect_window; +Lisp_Object Vmouse_autoselect_window; /* Non-zero means draw tool bar buttons raised when the mouse moves over them. */ @@ -24019,9 +24019,22 @@ Each function is called with two arguments, the window and the end trigger value See `set-window-redisplay-end-trigger'. */); Vredisplay_end_trigger_functions = Qnil; - DEFVAR_BOOL ("mouse-autoselect-window", &mouse_autoselect_window, - doc: /* *Non-nil means autoselect window with mouse pointer. */); - mouse_autoselect_window = 0; + DEFVAR_LISP ("mouse-autoselect-window", &Vmouse_autoselect_window, + doc: /* *Non-nil means autoselect window with mouse pointer. +If nil, do not autoselect windows. +A positive number means delay autoselection by that many seconds: a +window is autoselected only after the mouse has remained in that +window for the duration of the delay. +A negative number has a similar effect, but causes windows to be +autoselected only after the mouse has stopped moving. \(Because of +the way Emacs compares mouse events, you will occasionally wait twice +that time before the window gets selected.\) +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. */); + Vmouse_autoselect_window = Qnil; DEFVAR_BOOL ("auto-resize-tool-bars", &auto_resize_tool_bars_p, doc: /* *Non-nil means automatically resize tool-bars. diff --git a/src/xterm.c b/src/xterm.c index 757a022d35c..e7a462aef58 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6583,7 +6583,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) { /* Generate SELECT_WINDOW_EVENTs when needed. */ - if (mouse_autoselect_window) + if (!NILP (Vmouse_autoselect_window)) { Lisp_Object window; |