unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
Subject: Re: customizing double click
Date: Sat, 13 Aug 2005 14:11:50 +0300	[thread overview]
Message-ID: <uu0hum6q1.fsf@gnu.org> (raw)
In-Reply-To: <cc324ac7050812171142bf25b9@mail.gmail.com> (message from Rajneesh Hegde on Fri, 12 Aug 2005 20:11:32 -0400)

> Date: Fri, 12 Aug 2005 20:11:32 -0400
> From: Rajneesh Hegde <emsink1@gmail.com>
> 
> Then I bind as follows:
> (define-key LaTeX-mode-map [double-down-mouse-1] 'my-LaTeX-forward-search)
> 
> The problem is that on double-clicking on a word-constituent
> character, the double-down event runs the above function (which, as
> expected, does nothing) , but the subsequent double-click event
> doesn't have the usual effect of selecting the word.
> 
> On the other hand, if I bind my function to [double-mouse-1], it
> doesn't even get invoked, although the binding is successful. What am
> I missing? Thanks,

Does the following excerpt from the ELisp manual help you understand
the issue?

       Before the double-click or double-drag event, Emacs generates a
    "double-down" event when the user presses the button down for the
    second time.  Its event type contains `double-down' instead of just
    `down'.  If a double-down event has no binding, Emacs looks for an
    alternate binding as if the event were an ordinary button-down event.
    If it finds no binding that way either, the double-down event is
    ignored.

       To summarize, when you click a button and then press it again right
    away, Emacs generates a down event and a click event for the first
    click, a double-down event when you press the button again, and finally
    either a double-click or a double-drag event.

  reply	other threads:[~2005-08-13 11:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-13  0:11 customizing double click Rajneesh Hegde
2005-08-13 11:11 ` Eli Zaretskii [this message]
2005-08-13 13:18   ` Rajneesh Hegde
2005-08-15  3:52     ` Rajneesh Hegde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uu0hum6q1.fsf@gnu.org \
    --to=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).