[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7683: 24.0.50;` Edit' > `Copy' does not copy to kill ring
From: |
Drew Adams |
Subject: |
bug#7683: 24.0.50;` Edit' > `Copy' does not copy to kill ring |
Date: |
Sun, 19 Dec 2010 13:40:28 -0800 |
emacs -Q
(So the value of `mouse-drag-copy-region' is nil.)
In buffer *scratch* select some words by double-clicking mouse-1 on one
word and then clicking mouse-3 on another word. Then choose Edit > Copy
from the menu-bar menu.
You see this silly (and incorrect) message (look in *Messages* if it
gets overwritten):
"Selecting a region with the mouse does `copy' automatically"
The selected text is _not_ copied to the kill ring as it should be (use
`C-h v kill-ring' to see). The Edit > Copy menu item shows a shortcut
of `M-w', which is `kill-ring-save', but that is not what happens in
this case.
The bugged code is this:
(defun menu-bar-kill-ring-save (beg end) ; in menu-bar.el
(interactive "r")
(if (mouse-region-match)
(message "Selecting a region with the mouse does `copy' automatically")
(kill-ring-save beg end)))
(defun mouse-region-match () ; in mouse.el
"Return non-nil if there's an active region that was set with the mouse."
(and (mark t) mark-active
(eq mouse-last-region-beg (region-beginning))
(eq mouse-last-region-end (region-end))
(eq mouse-last-region-tick (buffer-modified-tick))))
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-12-13 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
- bug#7683: 24.0.50;` Edit' > `Copy' does not copy to kill ring,
Drew Adams <=