GNU bug report logs - #1586
prefix arg when mouse clicking on header line

Previous Next

Package: emacs;

Reported by: "Roland Winkler" <Roland.Winkler <at> physik.uni-erlangen.de>

Date: Wed, 17 Dec 2008 06:48:45 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 1586 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 1586 <at> debbugs.gnu.org,
	Roland Winkler <Roland.Winkler <at> physik.uni-erlangen.de>
Subject: Re: bug#1586: prefix arg when mouse clicking on header line
Date: Mon, 04 Jul 2011 16:50:42 -0400
Stefan Monnier <monnier <at> iro.umontreal.ca> 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.




This bug report was last modified 13 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.