GNU bug report logs -
#1586
prefix arg when mouse clicking on header line
Previous Next
Full log
View this message in rfc822 format
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 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.