From: Juri Linkov Date: Tue, 21 Aug 2007 20:05:14 +0000 (+0000) Subject: (cua-paste): Use `mouse-region-match' instead of checking last-command. X-Git-Tag: emacs-pretest-23.0.90~11420 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4bf988000460061ba7a5857fc9ec8d16f48c2870;p=emacs.git (cua-paste): Use `mouse-region-match' instead of checking last-command. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9569de20af0..274533830df 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-21 Juri Linkov + + * 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 * loadup.el: Preload "button". diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 6e420b36242..98a9b4d6361 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -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