emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defining HAVE_MOUSE on Cygwin


From: Ken Brown
Subject: Re: Defining HAVE_MOUSE on Cygwin
Date: Sun, 07 Oct 2012 13:33:28 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0

On 10/7/2012 10:16 AM, Eli Zaretskii wrote:
Date: Sun, 07 Oct 2012 08:18:24 -0400
From: Ken Brown <address@hidden>
CC: address@hidden

+## 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]