# HG changeset patch # User Juri Linkov # Date 1187726704 0 # Node ID 0c55974f55f52e412edee864f8d1ded1653aa606 # Parent 9c9e50cbdf1eb225144eac662bfe81e0a269de3d (cua-paste): Use `mouse-region-match' instead of checking last-command. diff -r 9c9e50cbdf1e -r 0c55974f55f5 lisp/emulation/cua-base.el --- a/lisp/emulation/cua-base.el Tue Aug 21 20:04:51 2007 +0000 +++ b/lisp/emulation/cua-base.el Tue Aug 21 20:05:04 2007 +0000 @@ -907,14 +907,11 @@ (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