1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00

(yank-pop): Always call yank-undo-function with start <= end.

This commit is contained in:
Kim F. Storm 2003-01-18 23:59:12 +00:00
parent 2308acda4b
commit 8254897f32

View File

@ -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))