GNU bug report logs - #7462
24.0.50; prefix arg breaks `last-command' for `mouse-save-then-kill'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 21 Nov 2010 20:24:01 UTC

Severity: normal

Tags: fixed

Found in versions 24.3, 24.0.50

Fixed in version 24.4

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7462 in the body.
You can then email your comments to 7462 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7462; Package emacs. (Sun, 21 Nov 2010 20:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 21 Nov 2010 20:24:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; prefix arg breaks `last-command' for `mouse-save-then-kill'
Date: Sun, 21 Nov 2010 12:28:09 -0800
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'





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7462; Package emacs. (Thu, 14 Jun 2018 23:24:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7462 <at> debbugs.gnu.org
Subject: Re: bug#7462: 24.0.50;
 prefix arg breaks `last-command' for `mouse-save-then-kill'
Date: Thu, 14 Jun 2018 19:23:10 -0400
found 7462 24.3
tags 7462 fixed
close 7462 24.4
quit

"Drew Adams" <drew.adams <at> oracle.com> writes:

> 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.

Observed in 24.3: step #4 has no effect.
Expected and observed in 24.4+: step #4 kills the region selected in
step #2.




bug Marked as found in versions 24.3. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 14 Jun 2018 23:24:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 14 Jun 2018 23:24:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.4, send any further explanations to 7462 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 14 Jun 2018 23:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Jul 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 339 days ago.

Previous Next


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