summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2003-01-18 23:59:12 +0000
committerKim F. Storm <storm@cua.dk>2003-01-18 23:59:12 +0000
commitcf16d842318f85348f917f6368a42b44010a25fd (patch)
tree76e75e487bd388b774ea1ed8cb136be89abc6bca /lisp/simple.el
parent995c21bf8b0651f140df327b9afb296053234ae6 (diff)
downloademacs-cf16d842318f85348f917f6368a42b44010a25fd.tar.gz
(yank-pop): Always call yank-undo-function with start <= end.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el4
1 files changed, 3 insertions, 1 deletions
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))