1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-05 07:01:11 -08:00

(cua-paste): Use `mouse-region-match' instead of checking last-command.

This commit is contained in:
Juri Linkov 2007-08-21 20:05:14 +00:00
parent 67755cc483
commit 4bf9880004
2 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2007-08-21 Juri Linkov <juri@jurta.org>
* delsel.el (delete-selection-pre-hook):
* emulation/cua-base.el (cua-paste): Use `mouse-region-match'
instead of checking last-command.
2007-08-21 Juri Linkov <juri@jurta.org>
* loadup.el: Preload "button".

View file

@ -907,14 +907,11 @@ If global mark is active, copy from register or one character."
(setq paste-lines nil))) ;; paste all
;; Before a yank command, make sure we don't yank the
;; head of the kill-ring that really comes from the
;; currently active region we are going to delete
;; (when last-command is one that uses copy-region-as-kill
;; or kill-new). That would make yank a no-op.
;; currently active region we are going to delete.
;; That would make yank a no-op.
(if (and (string= (filter-buffer-substring (point) (mark))
(car kill-ring))
(memq last-command
'(mouse-set-region mouse-drag-region
mouse-save-then-kill mouse-secondary-save-then-kill)))
(mouse-region-match))
(current-kill 1))
(cua-delete-region)))
(cond