From: Dmitry Gutov <dgutov@yandex.ru>
To: martin rudalics <rudalics@gmx.at>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to bind a command to mouse-1 properly?
Date: Wed, 12 Dec 2012 15:25:27 +0400 [thread overview]
Message-ID: <50C869A7.5050808@yandex.ru> (raw)
In-Reply-To: <50C85ABD.5060802@gmx.at>
On 12.12.2012 14:21, martin rudalics wrote:
> > The bug discusses clicking inside scroll-margin (I'm not), and the fact
> > the mouse-clicks set the mark is declared intended at the end.
>
> As Johan mentions in this thread ...
>
> >> The real bug is that mouse-clicks set the mark (always). (Search for
> >> push-mark in mouse-drag-track.)
And Chong answers that this behavior is intended. And the bug is closed.
> ... which should explain ...
>
> > (setq deactivate-mark t) works, by the way. I just don't understand why
> > I have to do that, and if I should do something else.
>
> ... why you have "to do that".
If you look at my examples, the "non-working" one does exactly the same
thing as the working one. The only difference is the command name.
I guess the reason is in this mouse-drag-track code:
;; Find its binding.
(let* ((fun (key-binding (vector (car event))))
(do-multi-click (and (> (event-click-count event) 0)
(functionp fun)
(not (memq fun '(mouse-set-point
mouse-set-region))))))
next prev parent reply other threads:[~2012-12-12 11:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 9:42 How to bind a command to mouse-1 properly? martin rudalics
2012-12-12 10:01 ` Dmitry Gutov
2012-12-12 10:21 ` martin rudalics
2012-12-12 11:25 ` Dmitry Gutov [this message]
2012-12-12 12:43 ` martin rudalics
-- strict thread matches above, loose matches on Subject: below --
2012-12-12 7:36 Dmitry Gutov
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=50C869A7.5050808@yandex.ru \
--to=dgutov@yandex.ru \
--cc=help-gnu-emacs@gnu.org \
--cc=rudalics@gmx.at \
/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).