emacs-devel
[Top][All Lists]
Advanced

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

Re: when to bind *down-mouse* vs *mouse*?


From: Luc Teirlinck
Subject: Re: when to bind *down-mouse* vs *mouse*?
Date: Thu, 2 Dec 2004 20:00:12 -0600 (CST)

Drew Adams wrote:

   However, some of the standard bindings seem contradictory to me (but I'm no
   doubt missing some fundamental logic behind mouse-button bindings):

    - S-down-mouse-1 is bound to mouse-set-font.
    - M-mouse-2 is bound to mouse-yank-secondary.

and:

   Can someone clear this up for me? What is the recommendation? What is the
   logic behind mouse bindings for click events? Are some of the standard
   bindings inconsistent, or am I just missing something?

I do not see any inconsistency in the above.  S-down-mouse-1 brings up
the Font menu and where you release it (S-mouse-1) determines what
happens next.  I believe that it is in general preferable to bind
click events, rather than button-down events, unless you either want
to look for a drag type event or you want a two step process, like the
S-down-mouse-1 - S-mouse-1 sequence.

>From `(elisp)Button-Down Events':

     The usual reason to define a button-down event is so that you can
    track mouse motion (by reading motion events) until the button is
    released.

Sincerely,

Luc.




reply via email to

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