From: Basil L. Contovounesios Date: Thu, 12 Apr 2018 16:46:37 +0000 (+0100) Subject: Do not call interprogram-paste-function repeatedly X-Git-Tag: emacs-27.0.90~5097 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=532f5fb3877ccd535a822f7c3c08d396621b4325;p=emacs.git Do not call interprogram-paste-function repeatedly * lisp/simple.el (current-kill): Disable interprogram-paste-function so that kill-new doesn't call it repeatedly when save-interprogram-paste-before-kill is enabled. (bug#31209) --- diff --git a/lisp/simple.el b/lisp/simple.el index 839a4dd2c6c..863547a76ba 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4477,7 +4477,10 @@ move the yanking point; just return the Nth kill forward." ;; Disable the interprogram cut function when we add the new ;; text to the kill ring, so Emacs doesn't try to own the ;; selection, with identical text. - (let ((interprogram-cut-function nil)) + ;; Also disable the interprogram paste function, so that + ;; `kill-new' doesn't call it repeatedly. + (let ((interprogram-cut-function nil) + (interprogram-paste-function nil)) (if (listp interprogram-paste) ;; Use `reverse' to avoid modifying external data. (mapc #'kill-new (reverse interprogram-paste))