From: Kim F. Storm Date: Sat, 18 Jan 2003 23:59:12 +0000 (+0000) Subject: (yank-pop): Always call yank-undo-function with start <= end. X-Git-Tag: ttn-vms-21-2-B4~11594 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8254897f32fd8fc2b50ccda8b7f179f7c020c166;p=emacs.git (yank-pop): Always call yank-undo-function with start <= end. --- diff --git a/lisp/simple.el b/lisp/simple.el index a35269c1204..39b2631d2b6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1986,7 +1986,9 @@ comes the newest one." (setq this-command 'yank) (let ((inhibit-read-only t) (before (< (point) (mark t)))) - (funcall (or yank-undo-function 'delete-region) (point) (mark t)) + (if before + (funcall (or yank-undo-function 'delete-region) (point) (mark t)) + (funcall (or yank-undo-function 'delete-region) (mark t) (point))) (setq yank-undo-function nil) (set-marker (mark-marker) (point) (current-buffer)) (insert-for-yank (current-kill arg))