emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emulation/cua-base.el,v


From: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/lisp/emulation/cua-base.el,v
Date: Sun, 15 Jul 2007 19:55:57 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     07/07/15 19:55:57

Index: cua-base.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emulation/cua-base.el,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -b -r1.78 -r1.79
--- cua-base.el 24 Feb 2007 21:52:43 -0000      1.78
+++ cua-base.el 15 Jul 2007 19:55:57 -0000      1.79
@@ -898,9 +898,6 @@
      (t
       ;; Must save register here, since delete may override reg 0.
       (if mark-active
-         ;; Before a yank command, make sure we don't yank
-         ;; the same region that we are going to delete.
-         ;; That would make yank a no-op.
          (if cua--rectangle
              (progn
                (goto-char (min (mark) (point)))
@@ -908,8 +905,16 @@
                (setq paste-lines (cua--delete-rectangle))
                (if (= paste-lines 1)
                    (setq paste-lines nil))) ;; paste all
-           (if (string= (filter-buffer-substring (point) (mark))
+           ;; 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.
+           (if (and (string= (filter-buffer-substring (point) (mark))
                         (car kill-ring))
+                    (memq last-command
+                          '(mouse-set-region mouse-drag-region
+                            mouse-save-then-kill 
mouse-secondary-save-then-kill)))
                (current-kill 1))
            (cua-delete-region)))
       (cond




reply via email to

[Prev in Thread] Current Thread [Next in Thread]