unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Defining HAVE_MOUSE on Cygwin
@ 2012-10-07  1:56 Ken Brown
  2012-10-07  6:46 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Ken Brown @ 2012-10-07  1:56 UTC (permalink / raw)
  To: Emacs

A Cygwin user has requested that emacs have mouse support on Cygwin even 
if it is built --with-x=no.  Does anyone see a problem with this?  If 
not, what's the best way to do it?  Here's one possibility:

=== modified file 'configure.ac'
--- configure.ac        2012-10-06 00:44:36 +0000
+++ configure.ac        2012-10-07 01:53:21 +0000
@@ -4358,6 +4358,11 @@

  AC_SUBST(WINDOW_SYSTEM_OBJ)

+## Always build with mouse support on Cygwin
+if test "$opsys" = "cygwin" && test "$window_system" = "none"; then
+  AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
+fi
+
  AH_TOP([/* GNU Emacs site configuration template file.

  Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012



Ken

P.S. I'm not necessarily proposing this for 24.3, in view of the feature 
freeze.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07  1:56 Defining HAVE_MOUSE on Cygwin Ken Brown
@ 2012-10-07  6:46 ` Eli Zaretskii
  2012-10-07 12:18   ` Ken Brown
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-10-07  6:46 UTC (permalink / raw)
  To: Ken Brown; +Cc: emacs-devel

> Date: Sat, 06 Oct 2012 21:56:01 -0400
> From: Ken Brown <kbrown@cornell.edu>
> 
> A Cygwin user has requested that emacs have mouse support on Cygwin even 
> if it is built --with-x=no.  Does anyone see a problem with this?  If 
> not, what's the best way to do it?  Here's one possibility:
> 
> === modified file 'configure.ac'
> --- configure.ac        2012-10-06 00:44:36 +0000
> +++ configure.ac        2012-10-07 01:53:21 +0000
> @@ -4358,6 +4358,11 @@
> 
>   AC_SUBST(WINDOW_SYSTEM_OBJ)
> 
> +## Always build with mouse support on Cygwin
> +if test "$opsys" = "cygwin" && test "$window_system" = "none"; then
> +  AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
> +fi
> +
>   AH_TOP([/* GNU Emacs site configuration template file.
> 
>   Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012

How will this work?  HAVE_MOUSE on a console requires mouse-support
infrastructure.  AFAIK, we only have one such infrastructure: GPM.  Is
that available on Cygwin?  If not, how will the mouse gestures be made
known to Emacs in this build?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07  6:46 ` Eli Zaretskii
@ 2012-10-07 12:18   ` Ken Brown
  2012-10-07 14:16     ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Ken Brown @ 2012-10-07 12:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 10/7/2012 2:46 AM, Eli Zaretskii wrote:
>> Date: Sat, 06 Oct 2012 21:56:01 -0400
>> From: Ken Brown <kbrown@cornell.edu>
>>
>> A Cygwin user has requested that emacs have mouse support on Cygwin even
>> if it is built --with-x=no.  Does anyone see a problem with this?  If
>> not, what's the best way to do it?  Here's one possibility:
>>
>> === modified file 'configure.ac'
>> --- configure.ac        2012-10-06 00:44:36 +0000
>> +++ configure.ac        2012-10-07 01:53:21 +0000
>> @@ -4358,6 +4358,11 @@
>>
>>    AC_SUBST(WINDOW_SYSTEM_OBJ)
>>
>> +## Always build with mouse support on Cygwin
>> +if test "$opsys" = "cygwin" && test "$window_system" = "none"; then
>> +  AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
>> +fi
>> +
>>    AH_TOP([/* GNU Emacs site configuration template file.
>>
>>    Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012
>
> How will this work?  HAVE_MOUSE on a console requires mouse-support
> infrastructure.  AFAIK, we only have one such infrastructure: GPM.  Is
> that available on Cygwin?  If not, how will the mouse gestures be made
> known to Emacs in this build?

No, GPM is not available on Cygwin.  But one can still get rudimentary 
mouse support in Emacs by turning on xterm-mouse-mode, provided the 
terminal is xterm compatible.  And the standard Cygwin terminal is xterm 
compatible, i.e., it sends the standard xterm mouse escape sequences.

Ken




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07 12:18   ` Ken Brown
@ 2012-10-07 14:16     ` Eli Zaretskii
  2012-10-07 14:43       ` Stefan Monnier
  2012-10-07 17:33       ` Ken Brown
  0 siblings, 2 replies; 14+ messages in thread
From: Eli Zaretskii @ 2012-10-07 14:16 UTC (permalink / raw)
  To: Ken Brown; +Cc: emacs-devel

> Date: Sun, 07 Oct 2012 08:18:24 -0400
> From: Ken Brown <kbrown@cornell.edu>
> CC: emacs-devel@gnu.org
> 
> >> +## Always build with mouse support on Cygwin
> >> +if test "$opsys" = "cygwin" && test "$window_system" = "none"; then
> >> +  AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
> >> +fi
> >> +
> >>    AH_TOP([/* GNU Emacs site configuration template file.
> >>
> >>    Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012
> >
> > How will this work?  HAVE_MOUSE on a console requires mouse-support
> > infrastructure.  AFAIK, we only have one such infrastructure: GPM.  Is
> > that available on Cygwin?  If not, how will the mouse gestures be made
> > known to Emacs in this build?
> 
> No, GPM is not available on Cygwin.  But one can still get rudimentary 
> mouse support in Emacs by turning on xterm-mouse-mode, provided the 
> terminal is xterm compatible.  And the standard Cygwin terminal is xterm 
> compatible, i.e., it sends the standard xterm mouse escape sequences.

Cannot Cygwin Emacs be invoked from the cmd window, or from a terminal
that does not support xterm-mouse sequences?  If it can, what happens
then if you build emacs-nox that way?

To tell the truth, I'm a bit nervous about this change.  Code
conditioned by HAVE_MOUSE makes all kinds of assumptions, which I'm
not sure are true when xterm-mouse is the agent.  I will have to
review that code to have an pinion I can defend.

But if that works, my fears notwithstanding, why confine this to
Cygwin?  If we believe that emacs-nox will always run on a
mouse-capable terminal, let's turn on HAVE_MOUSE in all Posix builds.

P.S.  Any idea why that user couldn't run Emacs compiled with X using
the -nw switch?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07 14:16     ` Eli Zaretskii
@ 2012-10-07 14:43       ` Stefan Monnier
  2012-10-07 15:22         ` Eli Zaretskii
  2012-10-07 17:33       ` Ken Brown
  1 sibling, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2012-10-07 14:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Ken Brown, emacs-devel

> But if that works, my fears notwithstanding, why confine this to
> Cygwin?  If we believe that emacs-nox will always run on a
> mouse-capable terminal, let's turn on HAVE_MOUSE in all Posix builds.

Actually, I can't see why we have HAVE_MOUSE at all nowadays.


        Stefan



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07 14:43       ` Stefan Monnier
@ 2012-10-07 15:22         ` Eli Zaretskii
  2012-10-07 19:38           ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-10-07 15:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: kbrown, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Ken Brown <kbrown@cornell.edu>,  emacs-devel@gnu.org
> Date: Sun, 07 Oct 2012 10:43:31 -0400
> 
> > But if that works, my fears notwithstanding, why confine this to
> > Cygwin?  If we believe that emacs-nox will always run on a
> > mouse-capable terminal, let's turn on HAVE_MOUSE in all Posix builds.
> 
> Actually, I can't see why we have HAVE_MOUSE at all nowadays.

Perhaps someone should try compiling a -nox configuration with
HAVE_MOUSE defined and without GPM, and see if it works well on a text
terminal on Unix or GNU/Linux (a _real_ text terminal, not xterm).



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07 14:16     ` Eli Zaretskii
  2012-10-07 14:43       ` Stefan Monnier
@ 2012-10-07 17:33       ` Ken Brown
  2012-10-07 19:46         ` Eli Zaretskii
  1 sibling, 1 reply; 14+ messages in thread
From: Ken Brown @ 2012-10-07 17:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 10/7/2012 10:16 AM, Eli Zaretskii wrote:
>> Date: Sun, 07 Oct 2012 08:18:24 -0400
>> From: Ken Brown <kbrown@cornell.edu>
>> CC: emacs-devel@gnu.org
>>
>>>> +## Always build with mouse support on Cygwin
>>>> +if test "$opsys" = "cygwin" && test "$window_system" = "none"; then
>>>> +  AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
>>>> +fi
>>>> +
>>>>     AH_TOP([/* GNU Emacs site configuration template file.
>>>>
>>>>     Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012
>>>
>>> How will this work?  HAVE_MOUSE on a console requires mouse-support
>>> infrastructure.  AFAIK, we only have one such infrastructure: GPM.  Is
>>> that available on Cygwin?  If not, how will the mouse gestures be made
>>> known to Emacs in this build?
>>
>> No, GPM is not available on Cygwin.  But one can still get rudimentary
>> mouse support in Emacs by turning on xterm-mouse-mode, provided the
>> terminal is xterm compatible.  And the standard Cygwin terminal is xterm
>> compatible, i.e., it sends the standard xterm mouse escape sequences.
>
> Cannot Cygwin Emacs be invoked from the cmd window, or from a terminal
> that does not support xterm-mouse sequences?  If it can, what happens
> then if you build emacs-nox that way?

Surprisingly, it actually seems to work when invoked from the cmd window 
(in limited testing).  I don't have a terminal that doesn't support 
xterm-mouse sequences, so I can't test that.

> To tell the truth, I'm a bit nervous about this change.  Code
> conditioned by HAVE_MOUSE makes all kinds of assumptions, which I'm
> not sure are true when xterm-mouse is the agent.  I will have to
> review that code to have an pinion I can defend.
>
> But if that works, my fears notwithstanding, why confine this to
> Cygwin?  If we believe that emacs-nox will always run on a
> mouse-capable terminal, let's turn on HAVE_MOUSE in all Posix builds.

You're right.  If it doesn't work in all Posix builds, then I'm not 
interested in making Cygwin a special case.  I withdraw my original 
proposal.

> P.S.  Any idea why that user couldn't run Emacs compiled with X using
> the -nw switch?

He can do this (and is doing it currently).  He was looking for a more 
"lightweight" solution, that doesn't require installing X.

Ken



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07 15:22         ` Eli Zaretskii
@ 2012-10-07 19:38           ` Stefan Monnier
  2012-10-07 19:47             ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2012-10-07 19:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kbrown, emacs-devel

>> > But if that works, my fears notwithstanding, why confine this to
>> > Cygwin?  If we believe that emacs-nox will always run on a
>> > mouse-capable terminal, let's turn on HAVE_MOUSE in all Posix builds.
>> Actually, I can't see why we have HAVE_MOUSE at all nowadays.
> Perhaps someone should try compiling a -nox configuration with
> HAVE_MOUSE defined and without GPM, and see if it works well on a text
> terminal on Unix or GNU/Linux (a _real_ text terminal, not xterm).

I'm not claiming it works.  I'm claiming that there's no good reason why
it shouldn't work, so if it doesn't work it's a bug.  We should remove
HAVE_MOUSE and fix any breakage that might ensue (but since Emacs works
fine under xterm with xterm-mouse-mode disabled, I don't expect too
much breakage at least under GNU/Linux).


        Stefan



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07 17:33       ` Ken Brown
@ 2012-10-07 19:46         ` Eli Zaretskii
  0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2012-10-07 19:46 UTC (permalink / raw)
  To: Ken Brown; +Cc: emacs-devel

> Date: Sun, 07 Oct 2012 13:33:28 -0400
> From: Ken Brown <kbrown@cornell.edu>
> CC: emacs-devel@gnu.org
> 
> > Cannot Cygwin Emacs be invoked from the cmd window, or from a terminal
> > that does not support xterm-mouse sequences?  If it can, what happens
> > then if you build emacs-nox that way?
> 
> Surprisingly, it actually seems to work when invoked from the cmd window 
> (in limited testing).  I don't have a terminal that doesn't support 
> xterm-mouse sequences, so I can't test that.

If it works in the cmd window, then perhaps there's no problem at all.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07 19:38           ` Stefan Monnier
@ 2012-10-07 19:47             ` Eli Zaretskii
  2012-11-23 22:46               ` Ken Brown
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2012-10-07 19:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: kbrown, emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Date: Sun, 07 Oct 2012 15:38:24 -0400
> Cc: kbrown@cornell.edu, emacs-devel@gnu.org
> 
> >> > But if that works, my fears notwithstanding, why confine this to
> >> > Cygwin?  If we believe that emacs-nox will always run on a
> >> > mouse-capable terminal, let's turn on HAVE_MOUSE in all Posix builds.
> >> Actually, I can't see why we have HAVE_MOUSE at all nowadays.
> > Perhaps someone should try compiling a -nox configuration with
> > HAVE_MOUSE defined and without GPM, and see if it works well on a text
> > terminal on Unix or GNU/Linux (a _real_ text terminal, not xterm).
> 
> I'm not claiming it works.  I'm claiming that there's no good reason why
> it shouldn't work, so if it doesn't work it's a bug.  We should remove
> HAVE_MOUSE and fix any breakage that might ensue (but since Emacs works
> fine under xterm with xterm-mouse-mode disabled, I don't expect too
> much breakage at least under GNU/Linux).

If no one beats me to it, I will try that in a GNU/Linux TTY session
one of these days.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-10-07 19:47             ` Eli Zaretskii
@ 2012-11-23 22:46               ` Ken Brown
  2012-11-24 15:13                 ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: Ken Brown @ 2012-11-23 22:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]

On 10/7/2012 3:47 PM, Eli Zaretskii wrote:
>> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
>> Date: Sun, 07 Oct 2012 15:38:24 -0400
>> Cc: kbrown@cornell.edu, emacs-devel@gnu.org
>>
>>>>> But if that works, my fears notwithstanding, why confine this to
>>>>> Cygwin?  If we believe that emacs-nox will always run on a
>>>>> mouse-capable terminal, let's turn on HAVE_MOUSE in all Posix builds.
>>>> Actually, I can't see why we have HAVE_MOUSE at all nowadays.
>>> Perhaps someone should try compiling a -nox configuration with
>>> HAVE_MOUSE defined and without GPM, and see if it works well on a text
>>> terminal on Unix or GNU/Linux (a _real_ text terminal, not xterm).
>>
>> I'm not claiming it works.  I'm claiming that there's no good reason why
>> it shouldn't work, so if it doesn't work it's a bug.  We should remove
>> HAVE_MOUSE and fix any breakage that might ensue (but since Emacs works
>> fine under xterm with xterm-mouse-mode disabled, I don't expect too
>> much breakage at least under GNU/Linux).
>
> If no one beats me to it, I will try that in a GNU/Linux TTY session
> one of these days.

It looks like we all forgot about this.  Stefan, is the attached patch 
what you had in mind?

Ken

[-- Attachment #2: have_mouse.patch --]
[-- Type: text/plain, Size: 8631 bytes --]

=== modified file 'admin/CPP-DEFINES'
--- admin/CPP-DEFINES	2012-11-23 07:48:43 +0000
+++ admin/CPP-DEFINES	2012-11-23 22:12:46 +0000
@@ -259,7 +259,6 @@
 HAVE_MENUS
 HAVE_MKSTEMP
 HAVE_MMAP
-HAVE_MOUSE
 HAVE_MULTILINGUAL_MENU
 HAVE_NANOTIME
 HAVE_NET_IF_DL_H

=== modified file 'configure.ac'
--- configure.ac	2012-11-23 07:48:43 +0000
+++ configure.ac	2012-11-23 22:13:31 +0000
@@ -4357,7 +4357,6 @@
 ## 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
 

=== modified file 'msdos/sed2v2.inp'
--- msdos/sed2v2.inp	2012-11-03 19:14:22 +0000
+++ msdos/sed2v2.inp	2012-11-23 22:14:23 +0000
@@ -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/

=== modified file 'nt/config.nt'
--- nt/config.nt	2012-11-23 15:42:40 +0000
+++ nt/config.nt	2012-11-23 22:14:49 +0000
@@ -687,9 +687,6 @@
 /* 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
 

=== modified file 'src/frame.c'
--- src/frame.c	2012-11-12 04:00:55 +0000
+++ src/frame.c	2012-11-23 22:25:05 +0000
@@ -1467,7 +1467,6 @@
   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 @@
       XSETINT (x, col);
       XSETINT (y, row);
     }
-#endif
   XSETFRAME (lispy_dummy, f);
   retval = Fcons (lispy_dummy, Fcons (x, y));
   GCPRO1 (retval);
@@ -1514,7 +1512,6 @@
   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 @@
 						  &time_dummy);
     }
 
-#endif
   XSETFRAME (lispy_dummy, f);
   return Fcons (lispy_dummy, Fcons (x, y));
 }
@@ -1557,7 +1553,7 @@
     /* 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 @@
     /* 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);

=== modified file 'src/keyboard.c'
--- src/keyboard.c	2012-11-17 22:12:47 +0000
+++ src/keyboard.c	2012-11-23 22:23:33 +0000
@@ -306,9 +306,7 @@
 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_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 @@
   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 @@
   return 0;
 }
 
-#endif	/* HAVE_MOUSE || HAVE_GPM */
 \f
 /* This is the actual command reading loop,
    sans error-handling encapsulation.  */
@@ -1402,14 +1395,11 @@
 
       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 @@
 	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 @@
       if (f)
       	f->mouse_moved = 1;
     }
-#endif
 
   if (STRINGP (help) || NILP (help))
     {
@@ -3390,11 +3378,9 @@
 	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 @@
 
       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 @@
 #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 @@
 	    }
 	}
     }
-#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 @@
       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 @@
       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 @@
 			     Fcons (files,
 				    Qnil)));
       }
-#endif /* HAVE_MOUSE */
 
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
     || defined (HAVE_NS) || defined (USE_GTK)
@@ -5968,8 +5946,6 @@
     }
 }
 
-#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 @@
     }
 }
 
-#endif /* HAVE_MOUSE || HAVE GPM */
-
 /* Construct a switch frame event.  */
 static Lisp_Object
 make_lispy_switch_frame (Lisp_Object frame)
@@ -11233,9 +11207,7 @@
   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 @@
   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 @@
   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);


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-11-23 22:46               ` Ken Brown
@ 2012-11-24 15:13                 ` Stefan Monnier
  2012-11-24 17:22                   ` Ken Brown
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2012-11-24 15:13 UTC (permalink / raw)
  To: Ken Brown; +Cc: Eli Zaretskii, emacs-devel

> It looks like we all forgot about this.  Stefan, is the attached patch what
> you had in mind?

Yes, please install it on the trunk.


        Stefan



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-11-24 15:13                 ` Stefan Monnier
@ 2012-11-24 17:22                   ` Ken Brown
  2012-11-24 20:32                     ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: Ken Brown @ 2012-11-24 17:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eli Zaretskii, emacs-devel

On 11/24/2012 10:13 AM, Stefan Monnier wrote:
>> It looks like we all forgot about this.  Stefan, is the attached patch what
>> you had in mind?
>
> Yes, please install it on the trunk.

Done, as bzr revision 111000.

Ken



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Defining HAVE_MOUSE on Cygwin
  2012-11-24 17:22                   ` Ken Brown
@ 2012-11-24 20:32                     ` Stefan Monnier
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2012-11-24 20:32 UTC (permalink / raw)
  To: Ken Brown; +Cc: Eli Zaretskii, emacs-devel

> Done, as bzr revision 111000.

Thank you, now let's see if someone screams ;-)


        Stefan



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-11-24 20:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-07  1:56 Defining HAVE_MOUSE on Cygwin Ken Brown
2012-10-07  6:46 ` Eli Zaretskii
2012-10-07 12:18   ` Ken Brown
2012-10-07 14:16     ` Eli Zaretskii
2012-10-07 14:43       ` Stefan Monnier
2012-10-07 15:22         ` Eli Zaretskii
2012-10-07 19:38           ` Stefan Monnier
2012-10-07 19:47             ` Eli Zaretskii
2012-11-23 22:46               ` Ken Brown
2012-11-24 15:13                 ` Stefan Monnier
2012-11-24 17:22                   ` Ken Brown
2012-11-24 20:32                     ` Stefan Monnier
2012-10-07 17:33       ` Ken Brown
2012-10-07 19:46         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).