# HG changeset patch # User Juri Linkov # Date 1187726691 0 # Node ID 9c9e50cbdf1eb225144eac662bfe81e0a269de3d # Parent eeb13f703926fa9a9b8bc6f513463e6dc568b200 (delete-selection-pre-hook): Use `mouse-region-match' instead of checking last-command. diff -r eeb13f703926 -r 9c9e50cbdf1e lisp/delsel.el --- a/lisp/delsel.el Tue Aug 21 19:19:46 2007 +0000 +++ b/lisp/delsel.el Tue Aug 21 20:04:51 2007 +0000 @@ -89,14 +89,11 @@ ((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)