From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Please install Date: Wed, 17 Oct 2007 16:49:26 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1192654248 11127 80.91.229.12 (17 Oct 2007 20:50:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Oct 2007 20:50:48 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 17 22:50:49 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IiFqn-00070h-Uf for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2007 22:50:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IiFqg-0008A6-TW for ged-emacs-devel@m.gmane.org; Wed, 17 Oct 2007 16:50:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IiFpY-0007hd-NM for emacs-devel@gnu.org; Wed, 17 Oct 2007 16:49:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IiFpX-0007gz-SI for emacs-devel@gnu.org; Wed, 17 Oct 2007 16:49:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IiFpX-0007gq-O2 for emacs-devel@gnu.org; Wed, 17 Oct 2007 16:49:27 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IiFpW-0000GV-VX for emacs-devel@gnu.org; Wed, 17 Oct 2007 16:49:27 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IiFpW-0003Gp-9d; Wed, 17 Oct 2007 16:49:26 -0400 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81091 Archived-At: Please install this patch, which doesn't change the default user behavior. For etc/NEWS ** `interprogram-paste-function' can now return one string or a list of strings. In the latter case, Emacs puts the second and following strings on the kill ring. *** emacs-22.1/lisp/ChangeLog Sat Jun 2 00:30:23 2007 --- emacs-22.1lisp/ChangeLog Mon Oct 15 19:50:53 2007 *************** *** 1,3 **** --- 1,15 ---- + 2007-10-15 Tom Horsley + + * simple.el (current-kill): Accept list of strings as well + as single string from `interprogram-paste-function'. + 2007-06-02 Chong Yidong * Version 22.1 released. *** emacs-22.1/lisp/simple.el Sun May 27 10:35:51 2007 --- emacs-22.1lisp/simple.el Mon Oct 15 17:53:29 2007 *************** *** 2409,2414 **** --- 2409,2419 ---- string, then the caller of the function \(usually `current-kill') should put this string in the kill ring as the latest kill. + This function may also return a list of strings if the window + system supports multiple selections. The first string will be + used as the pasted text, but the other will be placed in the + kill ring for easy access via `yank-pop'. + Note that the function should return a string only if a program other than Emacs has provided a string for pasting; if Emacs provided the most recent string, the function should return nil. If it is *************** *** 2490,2500 **** (defun current-kill (n &optional do-not-move) "Rotate the yanking point by N places, and then return that kill. ! If N is zero, `interprogram-paste-function' is set, and calling it ! returns a string, then that string is added to the front of the ! kill ring and returned as the latest kill. ! 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) interprogram-paste-function (funcall interprogram-paste-function)))) --- 2495,2505 ---- (defun current-kill (n &optional do-not-move) "Rotate the yanking point by N places, and then return that kill. ! If N is zero, `interprogram-paste-function' is set, and calling it returns a ! string or list of strings, then that string (or list) is added to the front ! of the kill ring and the string (or first string in the list) is returned as ! the latest kill. 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) interprogram-paste-function (funcall interprogram-paste-function)))) *************** *** 2504,2511 **** ;; text to the kill ring, so Emacs doesn't try to own the ;; selection, with identical text. (let ((interprogram-cut-function nil)) ! (kill-new interprogram-paste)) ! interprogram-paste) (or kill-ring (error "Kill ring is empty")) (let ((ARGth-kill-element (nthcdr (mod (- n (length kill-ring-yank-pointer)) --- 2509,2518 ---- ;; text to the kill ring, so Emacs doesn't try to own the ;; selection, with identical text. (let ((interprogram-cut-function nil)) ! (if (listp interprogram-paste) ! (mapc 'kill-new (nreverse interprogram-paste)) ! (kill-new interprogram-paste))) ! (car kill-ring)) (or kill-ring (error "Kill ring is empty")) (let ((ARGth-kill-element (nthcdr (mod (- n (length kill-ring-yank-pointer))