]> git.eshelyaron.com Git - emacs.git/commitdiff
(delete-selection-pre-hook): Use `mouse-region-match' instead of checking last-command.
authorJuri Linkov <juri@jurta.org>
Tue, 21 Aug 2007 20:04:51 +0000 (20:04 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 21 Aug 2007 20:04:51 +0000 (20:04 +0000)
lisp/delsel.el

index 8d6e6ea97d2793b2eb6b22c7eaa22b5a7c6cf3b0..b4ae7965a3f660bc92aa9b2f8fc630c945541b99 100644 (file)
@@ -89,14 +89,11 @@ any selection."
                ((eq type 'yank)
                 ;; 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.
                 (when (and (string= (buffer-substring-no-properties (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))
                 (delete-active-region))
                ((eq type 'supersede)