summaryrefslogtreecommitdiff
path: root/lisp/delsel.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2007-08-21 20:04:51 +0000
committerJuri Linkov <juri@jurta.org>2007-08-21 20:04:51 +0000
commit67755cc4839b19875f9cf8ae5b5c48ea81b6649e (patch)
tree1860e57d3e264b02e843d018bbb1247da7bdff3f /lisp/delsel.el
parente255d6b0a1210d8f4fc6b2bff814ad39c658b81e (diff)
downloademacs-67755cc4839b19875f9cf8ae5b5c48ea81b6649e.tar.gz
(delete-selection-pre-hook): Use `mouse-region-match' instead of checking last-command.
Diffstat (limited to 'lisp/delsel.el')
-rw-r--r--lisp/delsel.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/delsel.el b/lisp/delsel.el
index 8d6e6ea97d2..b4ae7965a3f 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -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)