aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-01-16 15:56:50 +0200
committerEli Zaretskii2016-01-16 15:56:50 +0200
commit8515727358110eb6a49579d65d2b684097e79f0c (patch)
tree4dab23642c10b2555548024713666a4abd57835c
parent5409aca9afdba0f8554163b63526a6b831879700 (diff)
downloademacs-8515727358110eb6a49579d65d2b684097e79f0c.tar.gz
emacs-8515727358110eb6a49579d65d2b684097e79f0c.zip
Document renaming of selection-related functions
* doc/lispref/frames.texi (Window System Selections): Rename "x-*" functions into the corresponding "gui-*" functions. Make the description slightly less X-centric.
-rw-r--r--doc/lispref/frames.texi47
-rw-r--r--etc/NEWS3
2 files changed, 29 insertions, 21 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 1c6674cdda9..5d873acc1bf 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2637,18 +2637,19 @@ defined in the file @file{lisp/term/x-win.el}. Use @kbd{M-x apropos
2637@cindex primary selection 2637@cindex primary selection
2638@cindex secondary selection 2638@cindex secondary selection
2639 2639
2640 In the X window system, data can be transferred between different 2640 In window systems, such as X, data can be transferred between
2641applications by means of @dfn{selections}. X defines an arbitrary 2641different applications by means of @dfn{selections}. X defines an
2642number of @dfn{selection types}, each of which can store its own data; 2642arbitrary number of @dfn{selection types}, each of which can store its
2643however, only three are commonly used: the @dfn{clipboard}, 2643own data; however, only three are commonly used: the @dfn{clipboard},
2644@dfn{primary selection}, and @dfn{secondary selection}. @xref{Cut and 2644@dfn{primary selection}, and @dfn{secondary selection}. Other window
2645Paste,, Cut and Paste, emacs, The GNU Emacs Manual}, for Emacs 2645systems support only the clipboard. @xref{Cut and Paste,, Cut and
2646commands that make use of these selections. This section documents 2646Paste, emacs, The GNU Emacs Manual}, for Emacs commands that make use
2647the low-level functions for reading and setting X selections. 2647of these selections. This section documents the low-level functions
2648 2648for reading and setting window-system selections.
2649@deffn Command x-set-selection type data 2649
2650This function sets an X selection. It takes two arguments: a 2650@deffn Command gui-set-selection type data
2651selection type @var{type}, and the value to assign to it, @var{data}. 2651This function sets a window-system selection. It takes two arguments:
2652a selection type @var{type}, and the value to assign to it, @var{data}.
2652 2653
2653@var{type} should be a symbol; it is usually one of @code{PRIMARY}, 2654@var{type} should be a symbol; it is usually one of @code{PRIMARY},
2654@code{SECONDARY} or @code{CLIPBOARD}. These are symbols with 2655@code{SECONDARY} or @code{CLIPBOARD}. These are symbols with
@@ -2665,14 +2666,14 @@ stands for text in the overlay or between the markers. The argument
2665This function returns @var{data}. 2666This function returns @var{data}.
2666@end deffn 2667@end deffn
2667 2668
2668@defun x-get-selection &optional type data-type 2669@defun gui-get-selection &optional type data-type
2669This function accesses selections set up by Emacs or by other X 2670This function accesses selections set up by Emacs or by other
2670clients. It takes two optional arguments, @var{type} and 2671programs. It takes two optional arguments, @var{type} and
2671@var{data-type}. The default for @var{type}, the selection type, is 2672@var{data-type}. The default for @var{type}, the selection type, is
2672@code{PRIMARY}. 2673@code{PRIMARY}.
2673 2674
2674The @var{data-type} argument specifies the form of data conversion to 2675The @var{data-type} argument specifies the form of data conversion to
2675use, to convert the raw data obtained from another X client into Lisp 2676use, to convert the raw data obtained from another program into Lisp
2676data. Meaningful values include @code{TEXT}, @code{STRING}, 2677data. Meaningful values include @code{TEXT}, @code{STRING},
2677@code{UTF8_STRING}, @code{TARGETS}, @code{LENGTH}, @code{DELETE}, 2678@code{UTF8_STRING}, @code{TARGETS}, @code{LENGTH}, @code{DELETE},
2678@code{FILE_NAME}, @code{CHARACTER_POSITION}, @code{NAME}, 2679@code{FILE_NAME}, @code{CHARACTER_POSITION}, @code{NAME},
@@ -2680,7 +2681,8 @@ data. Meaningful values include @code{TEXT}, @code{STRING},
2680@code{HOST_NAME}, @code{USER}, @code{CLASS}, @code{ATOM}, and 2681@code{HOST_NAME}, @code{USER}, @code{CLASS}, @code{ATOM}, and
2681@code{INTEGER}. (These are symbols with upper-case names in accord 2682@code{INTEGER}. (These are symbols with upper-case names in accord
2682with X conventions.) The default for @var{data-type} is 2683with X conventions.) The default for @var{data-type} is
2683@code{STRING}. 2684@code{STRING}. Window systems other than X usually support only a
2685small subset of these types, in addition to @code{STRING}.
2684@end defun 2686@end defun
2685 2687
2686@defopt selection-coding-system 2688@defopt selection-coding-system
@@ -2692,10 +2694,15 @@ converts to the text representation that X11 normally uses.
2692 2694
2693@cindex clipboard support (for MS-Windows) 2695@cindex clipboard support (for MS-Windows)
2694When Emacs runs on MS-Windows, it does not implement X selections in 2696When Emacs runs on MS-Windows, it does not implement X selections in
2695general, but it does support the clipboard. @code{x-get-selection} 2697general, but it does support the clipboard. @code{gui-get-selection}
2696and @code{x-set-selection} on MS-Windows support the text data type 2698and @code{gui-set-selection} on MS-Windows support the text data type
2697only; if the clipboard holds other types of data, Emacs treats the 2699only; if the clipboard holds other types of data, Emacs treats the
2698clipboard as empty. 2700clipboard as empty. The supported data type is @code{STRING}.
2701
2702For backward compatibility, there are obsolete aliases
2703@code{x-get-selection} and @code{x-set-selection}, which were the
2704names of @code{gui-get-selection} and @code{gui-set-selection} before
2705Emacs 25.1.
2699 2706
2700@node Drag and Drop 2707@node Drag and Drop
2701@section Drag and Drop 2708@section Drag and Drop
diff --git a/etc/NEWS b/etc/NEWS
index 9a107f816ef..eac5b7e60f9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1431,7 +1431,8 @@ evaluated (and should return a string) when the closure is built.
1431+++ 1431+++
1432** New function `macroexpand-1' to perform a single step of macro expansion. 1432** New function `macroexpand-1' to perform a single step of macro expansion.
1433 1433
1434** Some "x-*" were obsoleted: 1434+++
1435** Some "x-*" functions were obsoleted and/or renamed:
1435*** x-select-text is renamed gui-select-text. 1436*** x-select-text is renamed gui-select-text.
1436*** x-selection-value is renamed gui-selection-value. 1437*** x-selection-value is renamed gui-selection-value.
1437*** x-get-selection is renamed gui-get-selection. 1438*** x-get-selection is renamed gui-get-selection.