comparison lisp/emulation/cua-base.el @ 83645:fd5b4a865d1d

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 814-823) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 59-69) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 237-238) - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-26
author Miles Bader <miles@gnu.org>
date Tue, 24 Jul 2007 01:25:28 +0000
parents edf631bdbb7a d59242324437
children 65663fcd2caa
comparison
equal deleted inserted replaced
83644:0ece58f6e0aa 83645:fd5b4a865d1d
896 (buffer-read-only 896 (buffer-read-only
897 (message "Cannot paste into a read-only buffer")) 897 (message "Cannot paste into a read-only buffer"))
898 (t 898 (t
899 ;; Must save register here, since delete may override reg 0. 899 ;; Must save register here, since delete may override reg 0.
900 (if mark-active 900 (if mark-active
901 ;; Before a yank command, make sure we don't yank
902 ;; the same region that we are going to delete.
903 ;; That would make yank a no-op.
904 (if cua--rectangle 901 (if cua--rectangle
905 (progn 902 (progn
906 (goto-char (min (mark) (point))) 903 (goto-char (min (mark) (point)))
907 (setq paste-column (cua--rectangle-left)) 904 (setq paste-column (cua--rectangle-left))
908 (setq paste-lines (cua--delete-rectangle)) 905 (setq paste-lines (cua--delete-rectangle))
909 (if (= paste-lines 1) 906 (if (= paste-lines 1)
910 (setq paste-lines nil))) ;; paste all 907 (setq paste-lines nil))) ;; paste all
911 (if (string= (filter-buffer-substring (point) (mark)) 908 ;; Before a yank command, make sure we don't yank the
912 (car kill-ring)) 909 ;; head of the kill-ring that really comes from the
910 ;; currently active region we are going to delete
911 ;; (when last-command is one that uses copy-region-as-kill
912 ;; or kill-new). That would make yank a no-op.
913 (if (and (string= (filter-buffer-substring (point) (mark))
914 (car kill-ring))
915 (memq last-command
916 '(mouse-set-region mouse-drag-region
917 mouse-save-then-kill mouse-secondary-save-then-kill)))
913 (current-kill 1)) 918 (current-kill 1))
914 (cua-delete-region))) 919 (cua-delete-region)))
915 (cond 920 (cond
916 (regtxt 921 (regtxt
917 (cond 922 (cond