Commit 8e8c1a72 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(Low-Level Kill Ring): interprogram-paste-function can now return a list

of strings.
parent a33a1f2a
2008-10-15 Eli Zaretskii <eliz@gnu.org> 2008-10-15 Eli Zaretskii <eliz@gnu.org>
* text.texi (Low-Level Kill Ring): interprogram-paste-function can
now return a list of strings.
* control.texi (Handling Errors): Document ignore-errors. * control.texi (Handling Errors): Document ignore-errors.
* frames.texi (Creating Frames): Document frame-inherited-parameters. * frames.texi (Creating Frames): Document frame-inherited-parameters.
......
...@@ -1054,12 +1054,13 @@ If @var{n} is zero, indicating a request for the latest kill, ...@@ -1054,12 +1054,13 @@ If @var{n} is zero, indicating a request for the latest kill,
@code{current-kill} calls the value of @code{current-kill} calls the value of
@code{interprogram-paste-function} (documented below) before @code{interprogram-paste-function} (documented below) before
consulting the kill ring. If that value is a function and calling it consulting the kill ring. If that value is a function and calling it
returns a string, @code{current-kill} pushes that string onto the kill returns a string or a list of several string, @code{current-kill}
ring and returns it. It also sets the yanking pointer to point to pushes the strings onto the kill ring and returns the first string.
that new entry, regardless of the value of @var{do-not-move}. It also sets the yanking pointer to point to that new entry,
Otherwise, @code{current-kill} does not treat a zero value for @var{n} regardless of the value of @var{do-not-move}. Otherwise,
specially: it returns the entry pointed at by the yanking pointer and @code{current-kill} does not treat a zero value for @var{n} specially:
does not move the yanking pointer. it returns the entry pointed at by the yanking pointer and does not
move the yanking pointer.
@end defun @end defun
@defun kill-new string &optional replace yank-handler @defun kill-new string &optional replace yank-handler
...@@ -1102,9 +1103,19 @@ If the value is a function, @code{current-kill} calls it to get the ...@@ -1102,9 +1103,19 @@ If the value is a function, @code{current-kill} calls it to get the
then that value is used as the ``most recent kill.'' If it returns then that value is used as the ``most recent kill.'' If it returns
@code{nil}, then the front of the kill ring is used. @code{nil}, then the front of the kill ring is used.
The normal use of this hook is to get the window system's primary To facilitate support for window systems that support multiple
selections, this function may also return a list of strings. In that
case, the first string is used as the ``most recent kill'', and all
the other strings are pushed onto the kill ring, for easy access by
@code{yank-pop}.
The normal use of this function is to get the window system's primary
selection as the most recent kill, even if the selection belongs to selection as the most recent kill, even if the selection belongs to
another application. @xref{Window System Selections}. another application. @xref{Window System Selections}. However, if
the selection was provided by the current Emacs session, this function
should return @code{nil}. (If it is hard to tell whether Emacs or
some other program provided the selection, it should be good enough to
use @code{string=} to compare it with the last text Emacs provided.)
@end defvar @end defvar
@defvar interprogram-cut-function @defvar interprogram-cut-function
...@@ -1118,7 +1129,7 @@ The second, optional, argument has the same meaning as the @var{push} ...@@ -1118,7 +1129,7 @@ The second, optional, argument has the same meaning as the @var{push}
argument to @code{x-set-cut-buffer} (@pxref{Definition of argument to @code{x-set-cut-buffer} (@pxref{Definition of
x-set-cut-buffer}) and only affects the second and later cut buffers. x-set-cut-buffer}) and only affects the second and later cut buffers.
The normal use of this hook is to set the window system's primary The normal use of this function is to set the window system's primary
selection (and first cut buffer) from the newly killed text. selection (and first cut buffer) from the newly killed text.
@xref{Window System Selections}. @xref{Window System Selections}.
@end defvar @end defvar
......
...@@ -1131,6 +1131,7 @@ this map rather than to function-key-map now. ...@@ -1131,6 +1131,7 @@ this map rather than to function-key-map now.
+++ +++
** `ignore-errors' is now a standard macro (does not require the CL package). ** `ignore-errors' is now a standard macro (does not require the CL package).
+++
** `interprogram-paste-function' can now return one string or a list ** `interprogram-paste-function' can now return one string or a list
of strings. In the latter case, Emacs puts the second and following of strings. In the latter case, Emacs puts the second and following
strings on the kill ring. strings on the kill ring.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment