[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31097: 27.0.50; Interprogram paste is destructively modified
From: |
Noam Postavsky |
Subject: |
bug#31097: 27.0.50; Interprogram paste is destructively modified |
Date: |
Thu, 12 Apr 2018 19:35:43 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
severity 31097 minor
quit
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> * simple.el (kill-new, current-kill): Non-destructively reverse list
> returned by interprogram-paste-function. (bug#31097)
Seems reasonable. Perhaps add some comments in case someone tries to
"optimize" it later?
> If optional arg DO-NOT-MOVE is non-nil, then don't actually
> move the yanking point; just return the Nth kill forward."
> -
> (let ((interprogram-paste (and (= n 0)
> - (let ((ARGth-kill-element
> + (let ((nth-kill-element
> (nthcdr (mod (- n (length kill-ring-yank-pointer))
> (length kill-ring))
> kill-ring)))
> (unless do-not-move
> - (setq kill-ring-yank-pointer ARGth-kill-element)
> + (setq kill-ring-yank-pointer nth-kill-element)
> (when (and yank-pop-change-selection
> (> n 0)
> interprogram-cut-function)
> - (funcall interprogram-cut-function (car ARGth-kill-element))))
> - (car ARGth-kill-element)))))
> + (funcall interprogram-cut-function (car nth-kill-element))))
> + (car nth-kill-element)))))
I don't think these hunks are needed.