From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#1586: prefix arg when mouse clicking on header line Date: Mon, 04 Jul 2011 16:50:42 -0400 Message-ID: <87y60dkbx9.fsf@stupidchicken.com> References: <87boxcl08i.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309812686 18817 80.91.229.12 (4 Jul 2011 20:51:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2011 20:51:26 +0000 (UTC) Cc: 1586@debbugs.gnu.org, Roland Winkler To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 04 22:51:21 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qdq6x-0008AC-6e for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2011 22:51:19 +0200 Original-Received: from localhost ([::1]:55229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdq6w-0007NH-3H for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2011 16:51:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdq6h-0007N9-AJ for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 16:51:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdq6g-00027r-GR for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 16:51:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdq6g-00027g-Ew for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 16:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qdq6f-0008Gx-MI; Mon, 04 Jul 2011 16:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jul 2011 20:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1586 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 1586-submit@debbugs.gnu.org id=B1586.130981264931780 (code B ref 1586); Mon, 04 Jul 2011 20:51:01 +0000 Original-Received: (at 1586) by debbugs.gnu.org; 4 Jul 2011 20:50:49 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qdq6T-0008GX-If for submit@debbugs.gnu.org; Mon, 04 Jul 2011 16:50:49 -0400 Original-Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qdq6S-0008GL-A2 for 1586@debbugs.gnu.org; Mon, 04 Jul 2011 16:50:48 -0400 Original-Received: from furball (dhcp128036226224.central.yale.edu [128.36.226.224]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id p64Kog1S002572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 4 Jul 2011 16:50:42 -0400 In-Reply-To: (Stefan Monnier's message of "Mon, 04 Jul 2011 15:05:44 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 04 Jul 2011 16:51:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47994 Archived-At: Stefan Monnier writes: > Does this actually fix the problem? If so, I don't understand why: > a down event that's not bound to anything should be dropped entirely by > read-key-sequence. > > So my guess at the problem is that [header-line down-mouse-1] is not > left unbound but instead is bound to something > (e.g. `mouse-drag-header-line' or `ignore'), so your code won't be > executed at all in that case. > > Now, I'm not sure if we should preserve the prefix arg even if the down > event is bound, or rather just change `mouse-drag-header-line' and/or > `ignore' to propagate the current-prefix-arg to the next event; but > unless I'm missing something your fix should have no effect. The patch does fix the test case: (defun test-bug () (interactive) (global-set-key [header-line mouse-1] 'foo) (setq header-line-format "a")) (defun foo (event &optional arg) (interactive "e\nP") (setq foo (cons arg event)) (message "%s" foo)) C-u mouse-1 on the header line with and without the patch, and you'll see the prefix arg being passed through, and being dropped.