From 8254897f32fd8fc2b50ccda8b7f179f7c020c166 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 18 Jan 2003 23:59:12 +0000 Subject: [PATCH] (yank-pop): Always call yank-undo-function with start <= end. --- lisp/simple.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) -- 2.39.2