diff options
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index f139555dd34..2a90a076315 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5772,9 +5772,8 @@ When called from Lisp, insert STRING like `insert-for-yank' does." (insert-for-yank string) (when yank-from-kill-ring-rotate (let ((pos (seq-position kill-ring string))) - (setq kill-ring-yank-pointer - (or (and pos (nthcdr pos kill-ring)) - kill-ring)))) + (when pos + (setq kill-ring-yank-pointer (nthcdr pos kill-ring))))) (if (consp arg) ;; Swap point and mark like in `yank' and `yank-pop'. (goto-char (prog1 (mark t) |