all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 7462@debbugs.gnu.org
Subject: bug#7462: 24.0.50; prefix arg breaks `last-command' for `mouse-save-then-kill'
Date: Sun, 21 Nov 2010 12:28:09 -0800	[thread overview]
Message-ID: <83B82FC7FE604A9BAE6F07269980CC18@us.oracle.com> (raw)

emacs -Q

Add a call to `message' at the end of `universal-argument-other-key' and
another at the beginning of `mouse-save-then-kill'.  Show the value of
`last-command' in these messages.

E.g.
(defun universal-argument-other-key (arg)
  ...
  (restore-overriding-map)
  (message "UAOK, last-command: %s" last-command)) ; @@@@@@

(defun mouse-save-then-kill (click)
  "..."
  (interactive "e")
  (message "MSTK, last-command: %s" last-command) ; @@@@@@
  ...)

1. Click `mouse-1' somewhere.
2. Click `mouse-3' at another location in the same buffer.
3. C-u
4. Click `mouse-3' at the same location as #2.

IOW, you've just used `C-u' for the second mouse-3 click.

The messages you see are these:

MSTK, last-command: mouse-set-point
UAOK, last-command: mouse-save-then-kill
MSTK, last-command: universal-argument-other-key

The bug is that `last-command' is set to `universal-argument-other-key'.
`last-command' should still be `mouse-save-then-kill'.

This happens somewhere between the end of the call to
`universal-argument-other-key' and entrance to `mouse-save-then-kill'
(more precisely, before the `message' call in `mouse-save-then-kill',
which happens after `interactive').

`mouse-save-then-kill' tests whether the `last-command' was
`mouse-save-then-kill', and this test fails if `C-u' is used before the
second mouse-3 click.

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-11-16 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'






             reply	other threads:[~2010-11-21 20:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 20:28 Drew Adams [this message]
2018-06-14 23:23 ` bug#7462: 24.0.50; prefix arg breaks `last-command' for `mouse-save-then-kill' Noam Postavsky

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=83B82FC7FE604A9BAE6F07269980CC18@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=7462@debbugs.gnu.org \
    /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.