aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-07-05 07:18:24 +0000
committerJim Blandy1993-07-05 07:18:24 +0000
commit564dc952e907b60abecbfd1906156c640625b9f9 (patch)
treeabaa1b227ad77578ada1e439af039b1a0f8de94e /src
parent3eea8aa2234f06d7209de642dbfe6238f7e0ef5d (diff)
downloademacs-564dc952e907b60abecbfd1906156c640625b9f9.tar.gz
emacs-564dc952e907b60abecbfd1906156c640625b9f9.zip
* keyboard.c (Vdouble_click_time): Renamed from double_click_time,
and made a Lisp_Object instead of an int. (make_lispy_event): If Vdouble_click_time is t, impose no time limit on double-clicks. (syms_of_keyboard): DEFVAR_LISP (not DEFVAR_INT) Vdouble_click_time (not double_click_time), and adjust doc string to say that `nil' means no double clicks, and `t' means no time limit.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index e0d7276a286..27d95dc2f31 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2157,9 +2157,10 @@ static int button_up_x;
2157static int button_up_y; 2157static int button_up_y;
2158static unsigned long button_up_time; 2158static unsigned long button_up_time;
2159 2159
2160/* The minimum time between clicks to make a double-click. */ 2160/* The maximum time between clicks to make a double-click,
2161 2161 or Qnil to disable double-click detection,
2162int double_click_time; 2162 or Qt for no time limit. */
2163Lisp_Object Vdouble_click_time;
2163 2164
2164/* The number of clicks in this multiple-click. */ 2165/* The number of clicks in this multiple-click. */
2165 2166
@@ -2347,8 +2348,10 @@ make_lispy_event (event)
2347 && XINT (event->x) == button_up_x 2348 && XINT (event->x) == button_up_x
2348 && XINT (event->y) == button_up_y 2349 && XINT (event->y) == button_up_y
2349 && button_up_time != 0 2350 && button_up_time != 0
2350 && ((int)(event->timestamp - button_up_time) 2351 && (EQ (Vdouble_click_time, Qt)
2351 < double_click_time)) 2352 || (INTEGERP (Vdouble_click_time)
2353 && ((int)(event->timestamp - button_up_time)
2354 < XINT (Vdouble_click_time)))))
2352 { 2355 {
2353 double_click_count++; 2356 double_click_count++;
2354 event->modifiers |= ((double_click_count > 2) 2357 event->modifiers |= ((double_click_count > 2)
@@ -5084,10 +5087,10 @@ Polling is needed only when using X windows and SIGIO does not work.\n\
5084Polling is automatically disabled in all other cases."); 5087Polling is automatically disabled in all other cases.");
5085 polling_period = 2; 5088 polling_period = 2;
5086 5089
5087 DEFVAR_INT ("double-click-time", &double_click_time, 5090 DEFVAR_LISP ("double-click-time", &Vdouble_click_time,
5088 "*Maximum time between mouse clicks to make a double-click.\n\ 5091 "*Maximum time between mouse clicks to make a double-click.\n\
5089Measured in milliseconds. Zero means disable double-click recognition;\n\ 5092Measured in milliseconds. nil means disable double-click recognition;\n\
5090a large number means double-clicks have no time limit and are detected\n\ 5093t means double-clicks have no time limit and are detected\n\
5091by position only."); 5094by position only.");
5092 double_click_time = 500; 5095 double_click_time = 500;
5093 5096