Mercurial > emacs
comparison lisp/emulation/cua-base.el @ 82508:0c55974f55f5
(cua-paste): Use `mouse-region-match' instead of checking last-command.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Tue, 21 Aug 2007 20:05:04 +0000 |
parents | 9bbef4c80f90 |
children | 27d11c1d4e46 b83d0dadb2a7 |
comparison
equal
deleted
inserted
replaced
82507:9c9e50cbdf1e | 82508:0c55974f55f5 |
---|---|
905 (setq paste-lines (cua--delete-rectangle)) | 905 (setq paste-lines (cua--delete-rectangle)) |
906 (if (= paste-lines 1) | 906 (if (= paste-lines 1) |
907 (setq paste-lines nil))) ;; paste all | 907 (setq paste-lines nil))) ;; paste all |
908 ;; Before a yank command, make sure we don't yank the | 908 ;; Before a yank command, make sure we don't yank the |
909 ;; head of the kill-ring that really comes from the | 909 ;; head of the kill-ring that really comes from the |
910 ;; currently active region we are going to delete | 910 ;; currently active region we are going to delete. |
911 ;; (when last-command is one that uses copy-region-as-kill | 911 ;; That would make yank a no-op. |
912 ;; or kill-new). That would make yank a no-op. | |
913 (if (and (string= (filter-buffer-substring (point) (mark)) | 912 (if (and (string= (filter-buffer-substring (point) (mark)) |
914 (car kill-ring)) | 913 (car kill-ring)) |
915 (memq last-command | 914 (mouse-region-match)) |
916 '(mouse-set-region mouse-drag-region | |
917 mouse-save-then-kill mouse-secondary-save-then-kill))) | |
918 (current-kill 1)) | 915 (current-kill 1)) |
919 (cua-delete-region))) | 916 (cua-delete-region))) |
920 (cond | 917 (cond |
921 (regtxt | 918 (regtxt |
922 (cond | 919 (cond |