all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 1586@debbugs.gnu.org,
	Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
Subject: bug#1586: prefix arg when mouse clicking on header line
Date: Mon, 04 Jul 2011 16:50:42 -0400	[thread overview]
Message-ID: <87y60dkbx9.fsf@stupidchicken.com> (raw)
In-Reply-To: <jwvfwml6fal.fsf-monnier+gnus-read-ephemeral-bug@gnu.org> (Stefan Monnier's message of "Mon, 04 Jul 2011 15:05:44 -0400")

Stefan Monnier <monnier@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.





      reply	other threads:[~2011-07-04 20:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 20:58 bug#1586: prefix arg when mouse clicking on header line Roland Winkler
2011-07-02 23:41 ` Chong Yidong
2011-07-04 19:05   ` Stefan Monnier
2011-07-04 20:50     ` Chong Yidong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y60dkbx9.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=1586@debbugs.gnu.org \
    --cc=Roland.Winkler@physik.uni-erlangen.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.