[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to bind a command to mouse-1 properly?
From: |
Dmitry Gutov |
Subject: |
Re: How to bind a command to mouse-1 properly? |
Date: |
Wed, 12 Dec 2012 15:25:27 +0400 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
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))))))