diff options
| author | Ken Brown | 2012-11-24 12:20:49 -0500 |
|---|---|---|
| committer | Ken Brown | 2012-11-24 12:20:49 -0500 |
| commit | bcd77a2ba0298c8551fef7c08b001a0f0517bac3 (patch) | |
| tree | 52f3dfb1542ec3472df8b1cb5407f91c26185999 /src | |
| parent | 433212bfdf135f9977491b0da3f231a95e4a96fb (diff) | |
| download | emacs-bcd77a2ba0298c8551fef7c08b001a0f0517bac3.tar.gz emacs-bcd77a2ba0298c8551fef7c08b001a0f0517bac3.zip | |
Remove HAVE_MOUSE; see https://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00403.html.
* configure.ac (HAVE_MOUSE): Remove.
* admin/CPP-DEFINES (HAVE_MOUSE): Remove.
* msdos/sed2v2.inp (HAVE_MOUSE): Remove.
* nt/config.nt (HAVE_MOUSE): Remove.
* src/keyboard.c (HAVE_MOUSE):
* src/frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
were always defined.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/frame.c | 8 | ||||
| -rw-r--r-- | src/keyboard.c | 32 |
3 files changed, 8 insertions, 38 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 32a14ef9e62..859b3a7d254 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-11-24 Ken Brown <kbrown@cornell.edu> | ||
| 2 | |||
| 3 | * keyboard.c (HAVE_MOUSE): | ||
| 4 | * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE | ||
| 5 | were always defined. | ||
| 6 | |||
| 1 | 2012-11-24 Eli Zaretskii <eliz@gnu.org> | 7 | 2012-11-24 Eli Zaretskii <eliz@gnu.org> |
| 2 | 8 | ||
| 3 | * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not | 9 | * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not |
diff --git a/src/frame.c b/src/frame.c index d580bf7f148..3501fc36675 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1467,7 +1467,6 @@ and returns whatever that function returns. */) | |||
| 1467 | f = SELECTED_FRAME (); | 1467 | f = SELECTED_FRAME (); |
| 1468 | x = y = Qnil; | 1468 | x = y = Qnil; |
| 1469 | 1469 | ||
| 1470 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 1471 | /* It's okay for the hook to refrain from storing anything. */ | 1470 | /* It's okay for the hook to refrain from storing anything. */ |
| 1472 | if (FRAME_TERMINAL (f)->mouse_position_hook) | 1471 | if (FRAME_TERMINAL (f)->mouse_position_hook) |
| 1473 | { | 1472 | { |
| @@ -1487,7 +1486,6 @@ and returns whatever that function returns. */) | |||
| 1487 | XSETINT (x, col); | 1486 | XSETINT (x, col); |
| 1488 | XSETINT (y, row); | 1487 | XSETINT (y, row); |
| 1489 | } | 1488 | } |
| 1490 | #endif | ||
| 1491 | XSETFRAME (lispy_dummy, f); | 1489 | XSETFRAME (lispy_dummy, f); |
| 1492 | retval = Fcons (lispy_dummy, Fcons (x, y)); | 1490 | retval = Fcons (lispy_dummy, Fcons (x, y)); |
| 1493 | GCPRO1 (retval); | 1491 | GCPRO1 (retval); |
| @@ -1514,7 +1512,6 @@ and nil for X and Y. */) | |||
| 1514 | f = SELECTED_FRAME (); | 1512 | f = SELECTED_FRAME (); |
| 1515 | x = y = Qnil; | 1513 | x = y = Qnil; |
| 1516 | 1514 | ||
| 1517 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 1518 | /* It's okay for the hook to refrain from storing anything. */ | 1515 | /* It's okay for the hook to refrain from storing anything. */ |
| 1519 | if (FRAME_TERMINAL (f)->mouse_position_hook) | 1516 | if (FRAME_TERMINAL (f)->mouse_position_hook) |
| 1520 | { | 1517 | { |
| @@ -1526,7 +1523,6 @@ and nil for X and Y. */) | |||
| 1526 | &time_dummy); | 1523 | &time_dummy); |
| 1527 | } | 1524 | } |
| 1528 | 1525 | ||
| 1529 | #endif | ||
| 1530 | XSETFRAME (lispy_dummy, f); | 1526 | XSETFRAME (lispy_dummy, f); |
| 1531 | return Fcons (lispy_dummy, Fcons (x, y)); | 1527 | return Fcons (lispy_dummy, Fcons (x, y)); |
| 1532 | } | 1528 | } |
| @@ -1557,7 +1553,7 @@ before calling this function on it, like this. | |||
| 1557 | /* Warping the mouse will cause enternotify and focus events. */ | 1553 | /* Warping the mouse will cause enternotify and focus events. */ |
| 1558 | x_set_mouse_position (XFRAME (frame), XINT (x), XINT (y)); | 1554 | x_set_mouse_position (XFRAME (frame), XINT (x), XINT (y)); |
| 1559 | #else | 1555 | #else |
| 1560 | #if defined (MSDOS) && defined (HAVE_MOUSE) | 1556 | #if defined (MSDOS) |
| 1561 | if (FRAME_MSDOS_P (XFRAME (frame))) | 1557 | if (FRAME_MSDOS_P (XFRAME (frame))) |
| 1562 | { | 1558 | { |
| 1563 | Fselect_frame (frame, Qnil); | 1559 | Fselect_frame (frame, Qnil); |
| @@ -1598,7 +1594,7 @@ before calling this function on it, like this. | |||
| 1598 | /* Warping the mouse will cause enternotify and focus events. */ | 1594 | /* Warping the mouse will cause enternotify and focus events. */ |
| 1599 | x_set_mouse_pixel_position (XFRAME (frame), XINT (x), XINT (y)); | 1595 | x_set_mouse_pixel_position (XFRAME (frame), XINT (x), XINT (y)); |
| 1600 | #else | 1596 | #else |
| 1601 | #if defined (MSDOS) && defined (HAVE_MOUSE) | 1597 | #if defined (MSDOS) |
| 1602 | if (FRAME_MSDOS_P (XFRAME (frame))) | 1598 | if (FRAME_MSDOS_P (XFRAME (frame))) |
| 1603 | { | 1599 | { |
| 1604 | Fselect_frame (frame, Qnil); | 1600 | Fselect_frame (frame, Qnil); |
diff --git a/src/keyboard.c b/src/keyboard.c index 951d4ad79dc..0ad6d18c044 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -306,9 +306,7 @@ static Lisp_Object Qmake_frame_visible; | |||
| 306 | static Lisp_Object Qselect_window; | 306 | static Lisp_Object Qselect_window; |
| 307 | Lisp_Object Qhelp_echo; | 307 | Lisp_Object Qhelp_echo; |
| 308 | 308 | ||
| 309 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 310 | static Lisp_Object Qmouse_fixup_help_message; | 309 | static Lisp_Object Qmouse_fixup_help_message; |
| 311 | #endif | ||
| 312 | 310 | ||
| 313 | /* Symbols to denote kinds of events. */ | 311 | /* Symbols to denote kinds of events. */ |
| 314 | static Lisp_Object Qfunction_key; | 312 | static Lisp_Object Qfunction_key; |
| @@ -417,12 +415,10 @@ static Lisp_Object read_char_x_menu_prompt (ptrdiff_t, Lisp_Object *, | |||
| 417 | static Lisp_Object read_char_minibuf_menu_prompt (int, ptrdiff_t, | 415 | static Lisp_Object read_char_minibuf_menu_prompt (int, ptrdiff_t, |
| 418 | Lisp_Object *); | 416 | Lisp_Object *); |
| 419 | static Lisp_Object make_lispy_event (struct input_event *); | 417 | static Lisp_Object make_lispy_event (struct input_event *); |
| 420 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 421 | static Lisp_Object make_lispy_movement (struct frame *, Lisp_Object, | 418 | static Lisp_Object make_lispy_movement (struct frame *, Lisp_Object, |
| 422 | enum scroll_bar_part, | 419 | enum scroll_bar_part, |
| 423 | Lisp_Object, Lisp_Object, | 420 | Lisp_Object, Lisp_Object, |
| 424 | Time); | 421 | Time); |
| 425 | #endif | ||
| 426 | static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object, | 422 | static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object, |
| 427 | Lisp_Object, const char *const *, | 423 | Lisp_Object, const char *const *, |
| 428 | Lisp_Object *, ptrdiff_t); | 424 | Lisp_Object *, ptrdiff_t); |
| @@ -1234,8 +1230,6 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, | |||
| 1234 | user_error ("No recursive edit is in progress"); | 1230 | user_error ("No recursive edit is in progress"); |
| 1235 | } | 1231 | } |
| 1236 | 1232 | ||
| 1237 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 1238 | |||
| 1239 | /* Restore mouse tracking enablement. See Ftrack_mouse for the only use | 1233 | /* Restore mouse tracking enablement. See Ftrack_mouse for the only use |
| 1240 | of this function. */ | 1234 | of this function. */ |
| 1241 | 1235 | ||
| @@ -1310,7 +1304,6 @@ some_mouse_moved (void) | |||
| 1310 | return 0; | 1304 | return 0; |
| 1311 | } | 1305 | } |
| 1312 | 1306 | ||
| 1313 | #endif /* HAVE_MOUSE || HAVE_GPM */ | ||
| 1314 | 1307 | ||
| 1315 | /* This is the actual command reading loop, | 1308 | /* This is the actual command reading loop, |
| 1316 | sans error-handling encapsulation. */ | 1309 | sans error-handling encapsulation. */ |
| @@ -1402,14 +1395,11 @@ command_loop_1 (void) | |||
| 1402 | 1395 | ||
| 1403 | Vdeactivate_mark = Qnil; | 1396 | Vdeactivate_mark = Qnil; |
| 1404 | 1397 | ||
| 1405 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 1406 | |||
| 1407 | /* Don't ignore mouse movements for more than a single command | 1398 | /* Don't ignore mouse movements for more than a single command |
| 1408 | loop. (This flag is set in xdisp.c whenever the tool bar is | 1399 | loop. (This flag is set in xdisp.c whenever the tool bar is |
| 1409 | resized, because the resize moves text up or down, and would | 1400 | resized, because the resize moves text up or down, and would |
| 1410 | generate false mouse drag events if we don't ignore them.) */ | 1401 | generate false mouse drag events if we don't ignore them.) */ |
| 1411 | ignore_mouse_drag_p = 0; | 1402 | ignore_mouse_drag_p = 0; |
| 1412 | #endif | ||
| 1413 | 1403 | ||
| 1414 | /* If minibuffer on and echo area in use, | 1404 | /* If minibuffer on and echo area in use, |
| 1415 | wait a short time and redraw minibuffer. */ | 1405 | wait a short time and redraw minibuffer. */ |
| @@ -2182,7 +2172,6 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, | |||
| 2182 | return; | 2172 | return; |
| 2183 | } | 2173 | } |
| 2184 | 2174 | ||
| 2185 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 2186 | if (!noninteractive && STRINGP (help)) | 2175 | if (!noninteractive && STRINGP (help)) |
| 2187 | { | 2176 | { |
| 2188 | /* The mouse-fixup-help-message Lisp function can call | 2177 | /* The mouse-fixup-help-message Lisp function can call |
| @@ -2195,7 +2184,6 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, | |||
| 2195 | if (f) | 2184 | if (f) |
| 2196 | f->mouse_moved = 1; | 2185 | f->mouse_moved = 1; |
| 2197 | } | 2186 | } |
| 2198 | #endif | ||
| 2199 | 2187 | ||
| 2200 | if (STRINGP (help) || NILP (help)) | 2188 | if (STRINGP (help) || NILP (help)) |
| 2201 | { | 2189 | { |
| @@ -3390,11 +3378,9 @@ readable_events (int flags) | |||
| 3390 | return 1; | 3378 | return 1; |
| 3391 | } | 3379 | } |
| 3392 | 3380 | ||
| 3393 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 3394 | if (!(flags & READABLE_EVENTS_IGNORE_SQUEEZABLES) | 3381 | if (!(flags & READABLE_EVENTS_IGNORE_SQUEEZABLES) |
| 3395 | && !NILP (do_mouse_tracking) && some_mouse_moved ()) | 3382 | && !NILP (do_mouse_tracking) && some_mouse_moved ()) |
| 3396 | return 1; | 3383 | return 1; |
| 3397 | #endif | ||
| 3398 | if (single_kboard) | 3384 | if (single_kboard) |
| 3399 | { | 3385 | { |
| 3400 | if (current_kboard->kbd_queue_has_data) | 3386 | if (current_kboard->kbd_queue_has_data) |
| @@ -3762,10 +3748,8 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3762 | 3748 | ||
| 3763 | if (kbd_fetch_ptr != kbd_store_ptr) | 3749 | if (kbd_fetch_ptr != kbd_store_ptr) |
| 3764 | break; | 3750 | break; |
| 3765 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 3766 | if (!NILP (do_mouse_tracking) && some_mouse_moved ()) | 3751 | if (!NILP (do_mouse_tracking) && some_mouse_moved ()) |
| 3767 | break; | 3752 | break; |
| 3768 | #endif | ||
| 3769 | 3753 | ||
| 3770 | /* If the quit flag is set, then read_char will return | 3754 | /* If the quit flag is set, then read_char will return |
| 3771 | quit_char, so that counts as "available input." */ | 3755 | quit_char, so that counts as "available input." */ |
| @@ -3780,10 +3764,8 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3780 | #endif | 3764 | #endif |
| 3781 | if (kbd_fetch_ptr != kbd_store_ptr) | 3765 | if (kbd_fetch_ptr != kbd_store_ptr) |
| 3782 | break; | 3766 | break; |
| 3783 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 3784 | if (!NILP (do_mouse_tracking) && some_mouse_moved ()) | 3767 | if (!NILP (do_mouse_tracking) && some_mouse_moved ()) |
| 3785 | break; | 3768 | break; |
| 3786 | #endif | ||
| 3787 | if (end_time) | 3769 | if (end_time) |
| 3788 | { | 3770 | { |
| 3789 | EMACS_TIME now = current_emacs_time (); | 3771 | EMACS_TIME now = current_emacs_time (); |
| @@ -4040,7 +4022,6 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4040 | } | 4022 | } |
| 4041 | } | 4023 | } |
| 4042 | } | 4024 | } |
| 4043 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 4044 | /* Try generating a mouse motion event. */ | 4025 | /* Try generating a mouse motion event. */ |
| 4045 | else if (!NILP (do_mouse_tracking) && some_mouse_moved ()) | 4026 | else if (!NILP (do_mouse_tracking) && some_mouse_moved ()) |
| 4046 | { | 4027 | { |
| @@ -4085,7 +4066,6 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4085 | if (!NILP (x) && NILP (obj)) | 4066 | if (!NILP (x) && NILP (obj)) |
| 4086 | obj = make_lispy_movement (f, bar_window, part, x, y, t); | 4067 | obj = make_lispy_movement (f, bar_window, part, x, y, t); |
| 4087 | } | 4068 | } |
| 4088 | #endif /* HAVE_MOUSE || HAVE GPM */ | ||
| 4089 | else | 4069 | else |
| 4090 | /* We were promised by the above while loop that there was | 4070 | /* We were promised by the above while loop that there was |
| 4091 | something for us to read! */ | 4071 | something for us to read! */ |
| @@ -5397,7 +5377,6 @@ make_lispy_event (struct input_event *event) | |||
| 5397 | return Qnil; | 5377 | return Qnil; |
| 5398 | #endif | 5378 | #endif |
| 5399 | 5379 | ||
| 5400 | #ifdef HAVE_MOUSE | ||
| 5401 | /* A mouse click. Figure out where it is, decide whether it's | 5380 | /* A mouse click. Figure out where it is, decide whether it's |
| 5402 | a press, click or drag, and build the appropriate structure. */ | 5381 | a press, click or drag, and build the appropriate structure. */ |
| 5403 | case MOUSE_CLICK_EVENT: | 5382 | case MOUSE_CLICK_EVENT: |
| @@ -5849,7 +5828,6 @@ make_lispy_event (struct input_event *event) | |||
| 5849 | Fcons (files, | 5828 | Fcons (files, |
| 5850 | Qnil))); | 5829 | Qnil))); |
| 5851 | } | 5830 | } |
| 5852 | #endif /* HAVE_MOUSE */ | ||
| 5853 | 5831 | ||
| 5854 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ | 5832 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ |
| 5855 | || defined (HAVE_NS) || defined (USE_GTK) | 5833 | || defined (HAVE_NS) || defined (USE_GTK) |
| @@ -5968,8 +5946,6 @@ make_lispy_event (struct input_event *event) | |||
| 5968 | } | 5946 | } |
| 5969 | } | 5947 | } |
| 5970 | 5948 | ||
| 5971 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 5972 | |||
| 5973 | static Lisp_Object | 5949 | static Lisp_Object |
| 5974 | make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, | 5950 | make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, |
| 5975 | Lisp_Object x, Lisp_Object y, Time t) | 5951 | Lisp_Object x, Lisp_Object y, Time t) |
| @@ -5997,8 +5973,6 @@ make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_pa | |||
| 5997 | } | 5973 | } |
| 5998 | } | 5974 | } |
| 5999 | 5975 | ||
| 6000 | #endif /* HAVE_MOUSE || HAVE GPM */ | ||
| 6001 | |||
| 6002 | /* Construct a switch frame event. */ | 5976 | /* Construct a switch frame event. */ |
| 6003 | static Lisp_Object | 5977 | static Lisp_Object |
| 6004 | make_lispy_switch_frame (Lisp_Object frame) | 5978 | make_lispy_switch_frame (Lisp_Object frame) |
| @@ -11233,9 +11207,7 @@ init_keyboard (void) | |||
| 11233 | recent_keys_index = 0; | 11207 | recent_keys_index = 0; |
| 11234 | kbd_fetch_ptr = kbd_buffer; | 11208 | kbd_fetch_ptr = kbd_buffer; |
| 11235 | kbd_store_ptr = kbd_buffer; | 11209 | kbd_store_ptr = kbd_buffer; |
| 11236 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 11237 | do_mouse_tracking = Qnil; | 11210 | do_mouse_tracking = Qnil; |
| 11238 | #endif | ||
| 11239 | input_pending = 0; | 11211 | input_pending = 0; |
| 11240 | interrupt_input_blocked = 0; | 11212 | interrupt_input_blocked = 0; |
| 11241 | pending_signals = 0; | 11213 | pending_signals = 0; |
| @@ -11386,9 +11358,7 @@ syms_of_keyboard (void) | |||
| 11386 | DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar"); | 11358 | DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar"); |
| 11387 | DEFSYM (Qmenu_bar, "menu-bar"); | 11359 | DEFSYM (Qmenu_bar, "menu-bar"); |
| 11388 | 11360 | ||
| 11389 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 11390 | DEFSYM (Qmouse_fixup_help_message, "mouse-fixup-help-message"); | 11361 | DEFSYM (Qmouse_fixup_help_message, "mouse-fixup-help-message"); |
| 11391 | #endif | ||
| 11392 | 11362 | ||
| 11393 | DEFSYM (Qabove_handle, "above-handle"); | 11363 | DEFSYM (Qabove_handle, "above-handle"); |
| 11394 | DEFSYM (Qhandle, "handle"); | 11364 | DEFSYM (Qhandle, "handle"); |
| @@ -11508,9 +11478,7 @@ syms_of_keyboard (void) | |||
| 11508 | defsubr (&Sread_key_sequence); | 11478 | defsubr (&Sread_key_sequence); |
| 11509 | defsubr (&Sread_key_sequence_vector); | 11479 | defsubr (&Sread_key_sequence_vector); |
| 11510 | defsubr (&Srecursive_edit); | 11480 | defsubr (&Srecursive_edit); |
| 11511 | #if defined (HAVE_MOUSE) || defined (HAVE_GPM) | ||
| 11512 | defsubr (&Strack_mouse); | 11481 | defsubr (&Strack_mouse); |
| 11513 | #endif | ||
| 11514 | defsubr (&Sinput_pending_p); | 11482 | defsubr (&Sinput_pending_p); |
| 11515 | defsubr (&Scommand_execute); | 11483 | defsubr (&Scommand_execute); |
| 11516 | defsubr (&Srecent_keys); | 11484 | defsubr (&Srecent_keys); |