From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: How to bind a command to mouse-1 properly? Date: Wed, 12 Dec 2012 15:25:27 +0400 Message-ID: <50C869A7.5050808@yandex.ru> References: 87y5h3lo2e.fsf@yandex.ru <50C85185.3070904@gmx.at> <50C855FF.7000407@yandex.ru> <50C85ABD.5060802@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355311563 22054 80.91.229.3 (12 Dec 2012 11:26:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Dec 2012 11:26:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: martin rudalics Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 12 12:26:16 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TikS1-000693-VE for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Dec 2012 12:26:10 +0100 Original-Received: from localhost ([::1]:49420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TikRo-00048C-OZ for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Dec 2012 06:25:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TikRa-0003EY-7t for help-gnu-emacs@gnu.org; Wed, 12 Dec 2012 06:25:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TikRQ-000835-JL for help-gnu-emacs@gnu.org; Wed, 12 Dec 2012 06:25:42 -0500 Original-Received: from mail-lb0-f169.google.com ([209.85.217.169]:45130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TikRQ-00082v-CT for help-gnu-emacs@gnu.org; Wed, 12 Dec 2012 06:25:32 -0500 Original-Received: by mail-lb0-f169.google.com with SMTP id gk1so508091lbb.0 for ; Wed, 12 Dec 2012 03:25:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=HmquuP4s9ZA+iGw2Q7fei3Dn4Bv3cNdFgYSUEXf7Z9k=; b=OfK9U5NhZx9oOt/d5dIGYZ8w1JaMkYPUiUFp3rNOWqMEN+efD5CaSssbgZ8tN7MNNc HN7y2Sxa4zVjAbG2PHbXrsBZNvyCd9626Yw86r0e7dsHLvx5gTrxS8B9TVScAtDJhO04 8lEaois1NNyQ7DUZTHgOZ5tf3a3S/KaIQ0UtUVCDAFm0xcG/dI6irx1/uVf+ieOHuvMx f9JKxpf7XEgqHbJGL9MeZ2trPDGs0K/H7jK97E4otf0e9OAWs0tFE/rTzaQrtXPupHFl dUEf67+bBQR7sRZMVi7tkGP5zhZnvfEZP2X4qzMTdesALaMhYyh2Bbjl9ts+w0Ww784C R2+A== Original-Received: by 10.112.36.137 with SMTP id q9mr298422lbj.42.1355311531383; Wed, 12 Dec 2012 03:25:31 -0800 (PST) Original-Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id p5sm10559446lbh.2.2012.12.12.03.25.27 (version=SSLv3 cipher=OTHER); Wed, 12 Dec 2012 03:25:29 -0800 (PST) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <50C85ABD.5060802@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.217.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88147 Archived-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))))))