diff options
| author | Kim F. Storm | 2003-01-18 23:59:12 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2003-01-18 23:59:12 +0000 |
| commit | 8254897f32fd8fc2b50ccda8b7f179f7c020c166 (patch) | |
| tree | 651116bb4441ac099f1e7bb7d45aa3856e5c512c | |
| parent | 2308acda4bef48b35d45232b8e8844d575c2ef33 (diff) | |
| download | emacs-8254897f32fd8fc2b50ccda8b7f179f7c020c166.tar.gz emacs-8254897f32fd8fc2b50ccda8b7f179f7c020c166.zip | |
(yank-pop): Always call yank-undo-function with start <= end.
| -rw-r--r-- | lisp/simple.el | 4 |
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." | |||
| 1986 | (setq this-command 'yank) | 1986 | (setq this-command 'yank) |
| 1987 | (let ((inhibit-read-only t) | 1987 | (let ((inhibit-read-only t) |
| 1988 | (before (< (point) (mark t)))) | 1988 | (before (< (point) (mark t)))) |
| 1989 | (funcall (or yank-undo-function 'delete-region) (point) (mark t)) | 1989 | (if before |
| 1990 | (funcall (or yank-undo-function 'delete-region) (point) (mark t)) | ||
| 1991 | (funcall (or yank-undo-function 'delete-region) (mark t) (point))) | ||
| 1990 | (setq yank-undo-function nil) | 1992 | (setq yank-undo-function nil) |
| 1991 | (set-marker (mark-marker) (point) (current-buffer)) | 1993 | (set-marker (mark-marker) (point) (current-buffer)) |
| 1992 | (insert-for-yank (current-kill arg)) | 1994 | (insert-for-yank (current-kill arg)) |