]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove HAVE_MOUSE; see https://lists.gnu.org/archive/html/emacs-devel/2012-10/msg0040...
authorKen Brown <kbrown@cornell.edu>
Sat, 24 Nov 2012 17:20:49 +0000 (12:20 -0500)
committerKen Brown <kbrown@cornell.edu>
Sat, 24 Nov 2012 17:20:49 +0000 (12:20 -0500)
* 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.

ChangeLog
admin/CPP-DEFINES
admin/ChangeLog
configure.ac
msdos/ChangeLog
msdos/sed2v2.inp
nt/ChangeLog
nt/config.nt
src/ChangeLog
src/frame.c
src/keyboard.c

index 03815e86ff8ab4061cd24adc130769e9cb9e13bf..bddec07fc19e4ba51a9904e7321486f50ef894d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-11-24  Ken Brown  <kbrown@cornell.edu>
+
+       * configure.ac (HAVE_MOUSE): Remove.
+
 2012-11-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
index f4105f00c47946455304905fc72a190efc1e406b..20c97f886dd5eee7473759d663a572a6dae6578a 100644 (file)
@@ -259,7 +259,6 @@ HAVE_MEMSET
 HAVE_MENUS
 HAVE_MKSTEMP
 HAVE_MMAP
-HAVE_MOUSE
 HAVE_MULTILINGUAL_MENU
 HAVE_NANOTIME
 HAVE_NET_IF_DL_H
index fe75ae57a6d9e0d93afe4bbec03c72fa6ac77ca1..05c1463d325b955eaa95fa6c287aa5ee3839bb12 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-24  Ken Brown  <kbrown@cornell.edu>
+
+       * CPP-DEFINES (HAVE_MOUSE): Remove.
+
 2012-11-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
index 7dda0010f28c896d1c46f0dfbbc23b74fea2d7d0..085ca8341ae27b32be44d7281f4b9d829cdd7414 100644 (file)
@@ -4357,7 +4357,6 @@ AC_SUBST(LIB_GCC)
 ## Common for all window systems
 if test "$window_system" != "none"; then
   AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
-  AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
   WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
 fi
 
index 32083380dbc6da671b1ed5445e18b9d8836de9d6..753931ae0972998f07b5490ea12494e1f86c3c83 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-24  Ken Brown  <kbrown@cornell.edu>
+
+       * sed2v2.inp (HAVE_MOUSE): Remove.
+
 2012-11-03  Eli Zaretskii  <eliz@gnu.org>
 
        * sedlibmk.inp: Sync with changes in lib/Makefile.in.
index ba9eb4fb596d6603e6ea1bc221a1871698459de3..d03d4ced9d9abe10f5ed7d7a678079a97bc85323 100644 (file)
@@ -60,7 +60,6 @@
 /^#undef HAVE_SYNC *$/s/^.*$/#define HAVE_SYNC 1/
 /^#undef HAVE___BUILTIN_UNWIND_INIT *$/s/^.*$/#define HAVE___BUILTIN_UNWIND_INIT 1/
 /^#undef HAVE_MENUS *$/s/^.*$/#define HAVE_MENUS 1/
-/^#undef HAVE_MOUSE *$/s/^.*$/#define HAVE_MOUSE 1/
 /^#undef DATA_START/s/^.*$/#define DATA_START (\&etext + 1)/
 /^#undef GC_SETJMP_WORKS/s/^.*$/#define GC_SETJMP_WORKS 1/
 /^#undef ORDINARY_LINK/s/^.*$/#define ORDINARY_LINK 1/
index 0e66f723a2c188eb3440b5e2c6dea34440cfae21..dd79cfc2526499361859b56c7a6e7ae1627ef0fd 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-24  Ken Brown  <kbrown@cornell.edu>
+
+       * config.nt (HAVE_MOUSE): Remove.
+
 2012-11-23  Juanma Barranquero  <lekktu@gmail.com>
 
        * config.nt: Sync with autogen/config.in.
index ba63d2c48331d91cd60a099a4ad187e771abd299..60223306752fd3d697c7e259b643f8fb0802f777 100644 (file)
@@ -687,9 +687,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Define to 1 if you have a working `mmap' system call. */
 #undef HAVE_MMAP
 
-/* Define if you have mouse support. */
-#define HAVE_MOUSE 1
-
 /* Define to 1 if you have the `nanotime' function. */
 #undef HAVE_NANOTIME
 
index 32a14ef9e62e1bc2b3d800dd8c61304c235f5ee9..859b3a7d254c95f086ae652c8be395cf24550652 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-24  Ken Brown  <kbrown@cornell.edu>
+
+       * keyboard.c (HAVE_MOUSE):
+       * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
+       were always defined.
+
 2012-11-24  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
index d580bf7f14857bcce1a6c5be26907c6a2adb8034..3501fc36675e1c0ea097ba75109cff6dba4ebc75 100644 (file)
@@ -1467,7 +1467,6 @@ and returns whatever that function returns.  */)
   f = SELECTED_FRAME ();
   x = y = Qnil;
 
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
   /* It's okay for the hook to refrain from storing anything.  */
   if (FRAME_TERMINAL (f)->mouse_position_hook)
     {
@@ -1487,7 +1486,6 @@ and returns whatever that function returns.  */)
       XSETINT (x, col);
       XSETINT (y, row);
     }
-#endif
   XSETFRAME (lispy_dummy, f);
   retval = Fcons (lispy_dummy, Fcons (x, y));
   GCPRO1 (retval);
@@ -1514,7 +1512,6 @@ and nil for X and Y.  */)
   f = SELECTED_FRAME ();
   x = y = Qnil;
 
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
   /* It's okay for the hook to refrain from storing anything.  */
   if (FRAME_TERMINAL (f)->mouse_position_hook)
     {
@@ -1526,7 +1523,6 @@ and nil for X and Y.  */)
                                                  &time_dummy);
     }
 
-#endif
   XSETFRAME (lispy_dummy, f);
   return Fcons (lispy_dummy, Fcons (x, y));
 }
@@ -1557,7 +1553,7 @@ before calling this function on it, like this.
     /* Warping the mouse will cause enternotify and focus events.  */
     x_set_mouse_position (XFRAME (frame), XINT (x), XINT (y));
 #else
-#if defined (MSDOS) && defined (HAVE_MOUSE)
+#if defined (MSDOS)
   if (FRAME_MSDOS_P (XFRAME (frame)))
     {
       Fselect_frame (frame, Qnil);
@@ -1598,7 +1594,7 @@ before calling this function on it, like this.
     /* Warping the mouse will cause enternotify and focus events.  */
     x_set_mouse_pixel_position (XFRAME (frame), XINT (x), XINT (y));
 #else
-#if defined (MSDOS) && defined (HAVE_MOUSE)
+#if defined (MSDOS)
   if (FRAME_MSDOS_P (XFRAME (frame)))
     {
       Fselect_frame (frame, Qnil);
index 951d4ad79dcb0fc20d8ff136a4b5bb0bd58aec11..0ad6d18c0440a21f994dcb44161551a853bf2a74 100644 (file)
@@ -306,9 +306,7 @@ static Lisp_Object Qmake_frame_visible;
 static Lisp_Object Qselect_window;
 Lisp_Object Qhelp_echo;
 
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
 static Lisp_Object Qmouse_fixup_help_message;
-#endif
 
 /* Symbols to denote kinds of events.  */
 static Lisp_Object Qfunction_key;
@@ -417,12 +415,10 @@ static Lisp_Object read_char_x_menu_prompt (ptrdiff_t, Lisp_Object *,
 static Lisp_Object read_char_minibuf_menu_prompt (int, ptrdiff_t,
                                                   Lisp_Object *);
 static Lisp_Object make_lispy_event (struct input_event *);
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
 static Lisp_Object make_lispy_movement (struct frame *, Lisp_Object,
                                         enum scroll_bar_part,
                                         Lisp_Object, Lisp_Object,
                                        Time);
-#endif
 static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object,
                                         Lisp_Object, const char *const *,
                                         Lisp_Object *, ptrdiff_t);
@@ -1234,8 +1230,6 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0,
   user_error ("No recursive edit is in progress");
 }
 \f
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
-
 /* Restore mouse tracking enablement.  See Ftrack_mouse for the only use
    of this function.  */
 
@@ -1310,7 +1304,6 @@ some_mouse_moved (void)
   return 0;
 }
 
-#endif /* HAVE_MOUSE || HAVE_GPM */
 \f
 /* This is the actual command reading loop,
    sans error-handling encapsulation.  */
@@ -1402,14 +1395,11 @@ command_loop_1 (void)
 
       Vdeactivate_mark = Qnil;
 
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
-
       /* Don't ignore mouse movements for more than a single command
         loop.  (This flag is set in xdisp.c whenever the tool bar is
         resized, because the resize moves text up or down, and would
         generate false mouse drag events if we don't ignore them.)  */
       ignore_mouse_drag_p = 0;
-#endif
 
       /* If minibuffer on and echo area in use,
         wait a short time and redraw minibuffer.  */
@@ -2182,7 +2172,6 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
        return;
     }
 
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
   if (!noninteractive && STRINGP (help))
     {
       /* 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,
       if (f)
        f->mouse_moved = 1;
     }
-#endif
 
   if (STRINGP (help) || NILP (help))
     {
@@ -3390,11 +3378,9 @@ readable_events (int flags)
        return 1;
     }
 
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
   if (!(flags & READABLE_EVENTS_IGNORE_SQUEEZABLES)
       && !NILP (do_mouse_tracking) && some_mouse_moved ())
     return 1;
-#endif
   if (single_kboard)
     {
       if (current_kboard->kbd_queue_has_data)
@@ -3762,10 +3748,8 @@ kbd_buffer_get_event (KBOARD **kbp,
 
       if (kbd_fetch_ptr != kbd_store_ptr)
        break;
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
       if (!NILP (do_mouse_tracking) && some_mouse_moved ())
        break;
-#endif
 
       /* If the quit flag is set, then read_char will return
         quit_char, so that counts as "available input."  */
@@ -3780,10 +3764,8 @@ kbd_buffer_get_event (KBOARD **kbp,
 #endif
       if (kbd_fetch_ptr != kbd_store_ptr)
        break;
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
       if (!NILP (do_mouse_tracking) && some_mouse_moved ())
        break;
-#endif
       if (end_time)
        {
          EMACS_TIME now = current_emacs_time ();
@@ -4040,7 +4022,6 @@ kbd_buffer_get_event (KBOARD **kbp,
            }
        }
     }
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
   /* Try generating a mouse motion event.  */
   else if (!NILP (do_mouse_tracking) && some_mouse_moved ())
     {
@@ -4085,7 +4066,6 @@ kbd_buffer_get_event (KBOARD **kbp,
       if (!NILP (x) && NILP (obj))
        obj = make_lispy_movement (f, bar_window, part, x, y, t);
     }
-#endif /* HAVE_MOUSE || HAVE GPM */
   else
     /* We were promised by the above while loop that there was
        something for us to read!  */
@@ -5397,7 +5377,6 @@ make_lispy_event (struct input_event *event)
       return Qnil;
 #endif
 
-#ifdef HAVE_MOUSE
       /* A mouse click.  Figure out where it is, decide whether it's
          a press, click or drag, and build the appropriate structure.  */
     case MOUSE_CLICK_EVENT:
@@ -5849,7 +5828,6 @@ make_lispy_event (struct input_event *event)
                             Fcons (files,
                                    Qnil)));
       }
-#endif /* HAVE_MOUSE */
 
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
     || defined (HAVE_NS) || defined (USE_GTK)
@@ -5968,8 +5946,6 @@ make_lispy_event (struct input_event *event)
     }
 }
 
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
-
 static Lisp_Object
 make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part,
                     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
     }
 }
 
-#endif /* HAVE_MOUSE || HAVE GPM */
-
 /* Construct a switch frame event.  */
 static Lisp_Object
 make_lispy_switch_frame (Lisp_Object frame)
@@ -11233,9 +11207,7 @@ init_keyboard (void)
   recent_keys_index = 0;
   kbd_fetch_ptr = kbd_buffer;
   kbd_store_ptr = kbd_buffer;
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
   do_mouse_tracking = Qnil;
-#endif
   input_pending = 0;
   interrupt_input_blocked = 0;
   pending_signals = 0;
@@ -11386,9 +11358,7 @@ syms_of_keyboard (void)
   DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar");
   DEFSYM (Qmenu_bar, "menu-bar");
 
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
   DEFSYM (Qmouse_fixup_help_message, "mouse-fixup-help-message");
-#endif
 
   DEFSYM (Qabove_handle, "above-handle");
   DEFSYM (Qhandle, "handle");
@@ -11508,9 +11478,7 @@ syms_of_keyboard (void)
   defsubr (&Sread_key_sequence);
   defsubr (&Sread_key_sequence_vector);
   defsubr (&Srecursive_edit);
-#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
   defsubr (&Strack_mouse);
-#endif
   defsubr (&Sinput_pending_p);
   defsubr (&Scommand_execute);
   defsubr (&Srecent_keys);