diff options
| author | Po Lu | 2023-10-23 02:32:09 +0000 |
|---|---|---|
| committer | Po Lu | 2023-10-23 02:32:09 +0000 |
| commit | d33a72e8d745931d76dffaa3ea66bbc935ad00b9 (patch) | |
| tree | e6dc54a06223eabc7a9f62149d05a7f81bb136e8 | |
| parent | cfc796f6f24efd7cbc0dcac07f8eccd5200236bd (diff) | |
| download | emacs-d33a72e8d745931d76dffaa3ea66bbc935ad00b9.tar.gz emacs-d33a72e8d745931d76dffaa3ea66bbc935ad00b9.zip | |
Further improve documentation concerning selections
* doc/lispref/frames.texi (Window System Selections): Replace
incomplete attempts to address selection data types in this node
with references to Accessing Selections.
(Accessing Selections, X Selections): Revise for clarity and
pithiness.
| -rw-r--r-- | doc/lispref/frames.texi | 240 |
1 files changed, 115 insertions, 125 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index a561c456222..14f6f09ee71 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -4003,22 +4003,24 @@ defined in the file @file{lisp/term/x-win.el}. Use @kbd{M-x apropos | |||
| 4003 | @cindex secondary selection | 4003 | @cindex secondary selection |
| 4004 | 4004 | ||
| 4005 | In window systems, such as X, data can be transferred between | 4005 | In window systems, such as X, data can be transferred between |
| 4006 | different applications by means of @dfn{selections}. X defines an | 4006 | different applications by means of @dfn{selections}. Each window |
| 4007 | arbitrary number of @dfn{selection types}, each of which can store its | 4007 | system defines an arbitrary number of @dfn{selection types}, all |
| 4008 | own data; however, only three are commonly used: the @dfn{clipboard}, | 4008 | storing their own data; however, only three are commonly used: the |
| 4009 | @dfn{primary selection}, and @dfn{secondary selection}. Other window | 4009 | @dfn{clipboard}, @dfn{primary selection}, and @dfn{secondary |
| 4010 | systems support only the clipboard. @xref{Cut and Paste,, Cut and | 4010 | selection}. @xref{Cut and Paste,, Cut and Paste, emacs, The GNU Emacs |
| 4011 | Paste, emacs, The GNU Emacs Manual}, for Emacs commands that make use | 4011 | Manual}, for Emacs commands that make use of these selections. This |
| 4012 | of these selections. This section documents the low-level functions | 4012 | section documents the low-level functions for reading and setting |
| 4013 | for reading and setting window-system selections. | 4013 | window-system selections; @xref{Accessing Selections} for |
| 4014 | documentation concerning selection types and data formats under | ||
| 4015 | particular window systems. | ||
| 4014 | 4016 | ||
| 4015 | @deffn Command gui-set-selection type data | 4017 | @deffn Command gui-set-selection type data |
| 4016 | This function sets a window-system selection. It takes two arguments: | 4018 | This function sets a window-system selection. It takes two arguments: |
| 4017 | a selection type @var{type}, and the value to assign to it, @var{data}. | 4019 | a selection type @var{type}, and the value to assign to it, @var{data}. |
| 4018 | 4020 | ||
| 4019 | @var{type} should be a symbol; it is usually one of @code{PRIMARY}, | 4021 | @var{type} should be a symbol; it is usually one of @code{PRIMARY}, |
| 4020 | @code{SECONDARY} or @code{CLIPBOARD}. These are symbols with | 4022 | @code{SECONDARY} or @code{CLIPBOARD}. These are generally symbols |
| 4021 | upper-case names, in accord with X Window System conventions. If | 4023 | with upper-case names, in accord with X Window System conventions. If |
| 4022 | @var{type} is @code{nil}, that stands for @code{PRIMARY}. | 4024 | @var{type} is @code{nil}, that stands for @code{PRIMARY}. |
| 4023 | 4025 | ||
| 4024 | If @var{data} is @code{nil}, it means to clear out the selection. | 4026 | If @var{data} is @code{nil}, it means to clear out the selection. |
| @@ -4046,15 +4048,8 @@ programs. It takes two optional arguments, @var{type} and | |||
| 4046 | 4048 | ||
| 4047 | The @var{data-type} argument specifies the form of data conversion to | 4049 | The @var{data-type} argument specifies the form of data conversion to |
| 4048 | use, to convert the raw data obtained from another program into Lisp | 4050 | use, to convert the raw data obtained from another program into Lisp |
| 4049 | data. Meaningful values include @code{TEXT}, @code{STRING}, | 4051 | data. @xref{X Selections} for an enumeration of data types valid |
| 4050 | @code{UTF8_STRING}, @code{TARGETS}, @code{LENGTH}, @code{DELETE}, | 4052 | under X, and @xref{Other Selections} for those elsewhere. |
| 4051 | @code{FILE_NAME}, @code{CHARACTER_POSITION}, @code{NAME}, | ||
| 4052 | @code{LINE_NUMBER}, @code{COLUMN_NUMBER}, @code{OWNER_OS}, | ||
| 4053 | @code{HOST_NAME}, @code{USER}, @code{CLASS}, @code{ATOM}, and | ||
| 4054 | @code{INTEGER}. (These are symbols with upper-case names in accord | ||
| 4055 | with X conventions.) The default for @var{data-type} is | ||
| 4056 | @code{STRING}. Window systems other than X usually support only a | ||
| 4057 | small subset of these types, in addition to @code{STRING}. | ||
| 4058 | @end defun | 4053 | @end defun |
| 4059 | 4054 | ||
| 4060 | @defopt selection-coding-system | 4055 | @defopt selection-coding-system |
| @@ -4064,13 +4059,6 @@ Systems}. The default is @code{compound-text-with-extensions}, which | |||
| 4064 | converts to the text representation that X11 normally uses. | 4059 | converts to the text representation that X11 normally uses. |
| 4065 | @end defopt | 4060 | @end defopt |
| 4066 | 4061 | ||
| 4067 | @cindex clipboard support (for MS-Windows) | ||
| 4068 | When Emacs runs on MS-Windows, it does not implement X selections in | ||
| 4069 | general, but it does support the clipboard. @code{gui-get-selection} | ||
| 4070 | and @code{gui-set-selection} on MS-Windows support the text data type | ||
| 4071 | only; if the clipboard holds other types of data, Emacs treats the | ||
| 4072 | clipboard as empty. The supported data type is @code{STRING}. | ||
| 4073 | |||
| 4074 | For backward compatibility, there are obsolete aliases | 4062 | For backward compatibility, there are obsolete aliases |
| 4075 | @code{x-get-selection} and @code{x-set-selection}, which were the | 4063 | @code{x-get-selection} and @code{x-set-selection}, which were the |
| 4076 | names of @code{gui-get-selection} and @code{gui-set-selection} before | 4064 | names of @code{gui-get-selection} and @code{gui-set-selection} before |
| @@ -4079,27 +4067,25 @@ Emacs 25.1. | |||
| 4079 | @node Accessing Selections | 4067 | @node Accessing Selections |
| 4080 | @section Accessing Selections | 4068 | @section Accessing Selections |
| 4081 | 4069 | ||
| 4082 | @code{gui-get-selection} is able to retrieve multiple different | 4070 | The data types and selections that @code{gui-get-selection} and |
| 4083 | kinds of selection data from any number of selections. However, the | 4071 | @code{gui-set-selection} understand are not precisely specified and |
| 4084 | data types and selections that Emacs understands is not precisely | 4072 | differ subject to the window system on which Emacs is running. |
| 4085 | specified and differs depending on the window system on which Emacs is | 4073 | |
| 4086 | running. | 4074 | At the same time, @code{gui-set-selection} abstracts over plenty of |
| 4087 | 4075 | complexity: its @var{data} argument is given verbatim to | |
| 4088 | At the same time, @code{gui-set-selection} hides a great deal of | 4076 | system-specific code to be rendered suitable for transfer to the |
| 4089 | complexity behind its back, at least on some systems: its @var{data} | 4077 | window system or requesting clients. |
| 4090 | argument need not be a string, but is actually given verbatim to | 4078 | |
| 4091 | system specific code. | 4079 | The most comprehensive implementation of selections is that under |
| 4092 | 4080 | the X Window System. This is both an artifact of history (X was the | |
| 4093 | Emacs's implementation of selections is most complete on the X | 4081 | first window system supported by Emacs) and one occasioned by |
| 4094 | Window System. This is both an artifact of history (X was the first | 4082 | technical considerations: X selections are not merely an expedient for |
| 4095 | window system supported by Emacs) and one of technical reasons: | 4083 | the transfer of text and multimedia content between clients, but a |
| 4096 | instead of using selections only to transfer text and multimedia | 4084 | general inter-client communication system, a design that has yielded a |
| 4097 | content between clients, X uses selections as a general inter-client | 4085 | proliferation of selection and data types. |
| 4098 | communication system, leading to a great proliferation of selection | 4086 | |
| 4099 | data types. | 4087 | Compounding this confusion, there is another inter-client |
| 4100 | 4088 | communication mechanism under X: the Inter-Client Exchange. ICE is | |
| 4101 | Even more confusingly, X also supports another inter-client | ||
| 4102 | communication mechanism: the Inter-Client Exchange. However, ICE is | ||
| 4103 | only used by Emacs to communicate with session managers, and is a | 4089 | only used by Emacs to communicate with session managers, and is a |
| 4104 | separate topic. | 4090 | separate topic. |
| 4105 | 4091 | ||
| @@ -4111,12 +4097,12 @@ separate topic. | |||
| 4111 | @node X Selections | 4097 | @node X Selections |
| 4112 | @subsection X Selections | 4098 | @subsection X Selections |
| 4113 | 4099 | ||
| 4114 | X refrains from defining fixed data types for selection data, or a | 4100 | X refrains from defining fixed data types for selection data or a |
| 4115 | fixed number of selections. Selections are instead identified by X | 4101 | fixed number of selections. Selections are identified by X ``atoms'', |
| 4116 | ``atoms'', which are unique 29-bit identifiers issued by the X server | 4102 | which are unique 29-bit identifiers issued by the X server for string |
| 4117 | for a corresponding name. In Emacs, you can simply write a symbol | 4103 | names. This complexity is hidden by Emacs: when Lisp provides a |
| 4118 | with the name of the atom, and Emacs will transparently request these | 4104 | symbol whose name is that of the atom, Emacs will request these |
| 4119 | identifiers where necessary. | 4105 | identifiers without further intervention. |
| 4120 | 4106 | ||
| 4121 | When a program ``sets'' a selection under X, it actually makes | 4107 | When a program ``sets'' a selection under X, it actually makes |
| 4122 | itself the ``owner'' of the selection---the X server will then deliver | 4108 | itself the ``owner'' of the selection---the X server will then deliver |
| @@ -4125,27 +4111,29 @@ requesting client with the selection data. | |||
| 4125 | 4111 | ||
| 4126 | Similarly, a program does not ``get'' selection data from the X | 4112 | Similarly, a program does not ``get'' selection data from the X |
| 4127 | server. Instead, its selection requests are sent to the client with | 4113 | server. Instead, its selection requests are sent to the client with |
| 4128 | the window which last took ownership over the selection, which then | 4114 | the window which last asserted ownership over the selection, which |
| 4129 | replies with the requested data. | 4115 | which is expected to respond with the requested data. |
| 4130 | 4116 | ||
| 4131 | Each selection request contains three parameters: | 4117 | Each selection request incorporates three parameters: |
| 4132 | 4118 | ||
| 4133 | @itemize @bullet | 4119 | @itemize @bullet |
| 4134 | @item | 4120 | @item |
| 4135 | The window which requested the selection; this is used to identify the | 4121 | The window which requested the selection, which identifies the |
| 4136 | @c Not a typo: X spells ``requestor'' with an o. | 4122 | @c Not a typo: X spells ``requestor'' with an o. |
| 4137 | requesting program, otherwise known as the @dfn{requestor}. | 4123 | requesting program, otherwise known as the @dfn{requestor}. |
| 4138 | 4124 | ||
| 4139 | @item | 4125 | @item |
| 4140 | An atom identifying the ``target'' to which the owner should convert | 4126 | An atom identifying the @dfn{target} to which the owner should convert |
| 4141 | the selection. It is easiest to think of the conversion target as the | 4127 | the selection. It is easiest to think of the conversion target as the |
| 4142 | kind of data that the requestor wants: in selection requests made by | 4128 | kind of data that the requestor wants: in selection requests made by |
| 4143 | Emacs, the target is determined by the @dfn{type} argument to | 4129 | Emacs, the target is determined by the @var{type} argument to |
| 4144 | @code{gui-get-selection}. | 4130 | @code{gui-get-selection}. |
| 4145 | 4131 | ||
| 4146 | @item | 4132 | @item |
| 4147 | A 32-bit timestamp containing the X server time at which the requestor | 4133 | A 32-bit timestamp representing the X server time at which the |
| 4148 | last obtained input. | 4134 | requestor last received input; this parameter is not relevant to Lisp |
| 4135 | code, for it's only meant to abet synchronization between the X | ||
| 4136 | server, owner and requestor. | ||
| 4149 | @end itemize | 4137 | @end itemize |
| 4150 | 4138 | ||
| 4151 | The selection owner responds by tranferring to the requestor a | 4139 | The selection owner responds by tranferring to the requestor a |
| @@ -4157,30 +4145,29 @@ owner to a Lisp representation, which @code{gui-get-selection} | |||
| 4157 | returns. | 4145 | returns. |
| 4158 | 4146 | ||
| 4159 | By default, Emacs converts selection data consisting of any series | 4147 | By default, Emacs converts selection data consisting of any series |
| 4160 | of bytes to a unibyte string containing those bytes, selection data | 4148 | of bytes to a unibyte string holding those bytes, that consisting of a |
| 4161 | consisting of a single 16-bit or 32-bit word as an unsigned number, | 4149 | single 16-bit or 32-bit word as an unsigned number, and that |
| 4162 | and selection data consisting of multiple such words as a vector of | 4150 | consisting of multiple such words as a vector of unsigned numbers. |
| 4163 | unsigned numbers. However, Emacs applies special treatment for | 4151 | However, Emacs applies special treatment for data from the following |
| 4164 | several selection data types: | 4152 | conversion targets: |
| 4165 | 4153 | ||
| 4166 | @table @code | 4154 | @table @code |
| 4167 | @item INTEGER | 4155 | @item INTEGER |
| 4168 | 16-bit or 32-bit words of this type are treated as signed integers, | 4156 | 16-bit or 32-bit words of this type are treated as signed rather than |
| 4169 | instead of unsigned ones. If there are multiple words in the | 4157 | unsigned integers. If there are multiple words in the selection data, |
| 4170 | selection data, a vector is returned; otherwise, the integer is | 4158 | a vector is returned; otherwise, the integer is returned by itself. |
| 4171 | returned by itself. | ||
| 4172 | 4159 | ||
| 4173 | @item ATOM | 4160 | @item ATOM |
| 4174 | 32-bit words of this type are treated as X atoms, and returned (either | 4161 | 32-bit words of this type are treated as X atoms, and returned (either |
| 4175 | alone or as vectors) as Lisp symbols containing the names they | 4162 | alone or as vectors) as Lisp symbols by the names they identify. |
| 4176 | identify. Invalid atoms are returned as @code{nil}. | 4163 | Invalid atoms are replaced by @code{nil}. |
| 4177 | 4164 | ||
| 4178 | @item COMPOUND_TEXT | 4165 | @item COMPOUND_TEXT |
| 4179 | @item UTF8_STRING | 4166 | @item UTF8_STRING |
| 4180 | @item STRING | 4167 | @item STRING |
| 4181 | Unibyte strings returned for these data types will have a single | 4168 | A single @code{foreign-selection} text property set to the type of the |
| 4182 | @code{foreign-selection} text property set to a symbol with the type | 4169 | selection data will be placed in unibyte strings derived from a |
| 4183 | of the selection data. | 4170 | request for these data types. |
| 4184 | @end table | 4171 | @end table |
| 4185 | 4172 | ||
| 4186 | Each selection owner must return at least two selection targets: | 4173 | Each selection owner must return at least two selection targets: |
| @@ -4191,21 +4178,21 @@ number of other targets, some of which may be standardized by the X | |||
| 4191 | Consortium's | 4178 | Consortium's |
| 4192 | @url{http://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html, | 4179 | @url{http://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html, |
| 4193 | Inter-Client Communication Conventions Manual}, while others, such as | 4180 | Inter-Client Communication Conventions Manual}, while others, such as |
| 4194 | @code{UTF8_STRING}, were supposed to be standardized by the XFree86 | 4181 | @code{UTF8_STRING}, were meant to be standardized by the XFree86 |
| 4195 | Project, which unfortunately did not happen. | 4182 | Project, but their standardization was never completed. |
| 4196 | 4183 | ||
| 4197 | Requests for a given selection target may, by convention, return | 4184 | Requests for a given selection target may, by convention, return |
| 4198 | data in a specific type, or it may return data in one of several | 4185 | data in a specific type, or it may return data in one of several |
| 4199 | types, whichever is most convenient for the selection owner; the | 4186 | types, whichever is most convenient for the selection owner; the |
| 4200 | latter type of selection target is dubbed a @dfn{polymorphic target}. | 4187 | latter type of selection target is dubbed a @dfn{polymorphic target}. |
| 4201 | A selection target may also return no data at all: by convention, the | 4188 | In response to a request, a selection target may also return no data |
| 4202 | selection owner performs some action a side effect upon responding to | 4189 | at all, whereafter the selection owner executes some action as a side |
| 4203 | a selection request with that target, and as such these targets are | 4190 | effect. Targets that are thus replied to are termed @dfn{side-effect |
| 4204 | referred to as @dfn{side-effect targets}. | 4191 | targets}. |
| 4205 | 4192 | ||
| 4206 | Here are some selection targets which behave in a reasonably | 4193 | Here are some selection targets whose behavior is generally |
| 4207 | standard manner when used with the @code{CLIPBOARD}, @code{PRIMARY}, | 4194 | consistent with a standard when requested from the @code{CLIPBOARD}, |
| 4208 | or @code{SECONDARY} selections. | 4195 | @code{PRIMARY}, or @code{SECONDARY} selections. |
| 4209 | 4196 | ||
| 4210 | @table @code | 4197 | @table @code |
| 4211 | @item ADOBE_PORTABLE_DOCUMENT_FORMAT | 4198 | @item ADOBE_PORTABLE_DOCUMENT_FORMAT |
| @@ -4271,7 +4258,7 @@ positions of the selection data in the text field containing it. | |||
| 4271 | 4258 | ||
| 4272 | @item MODULE | 4259 | @item MODULE |
| 4273 | This target returns the name of any function containing the selection | 4260 | This target returns the name of any function containing the selection |
| 4274 | data. It is mainly used by text editors. | 4261 | data. It is principally requested by text editors. |
| 4275 | 4262 | ||
| 4276 | @item STRING | 4263 | @item STRING |
| 4277 | This target returns the selection data as a string of type | 4264 | This target returns the selection data as a string of type |
| @@ -4303,17 +4290,18 @@ selection owner. | |||
| 4303 | When a request for the targets @code{STRING}, @code{COMPOUND_TEXT}, | 4290 | When a request for the targets @code{STRING}, @code{COMPOUND_TEXT}, |
| 4304 | or @code{UTF8_STRING} is made using the function | 4291 | or @code{UTF8_STRING} is made using the function |
| 4305 | @code{gui-get-selection}, and neither @code{selection-coding-system} | 4292 | @code{gui-get-selection}, and neither @code{selection-coding-system} |
| 4306 | nor @code{next-selection-coding-system} are set, the returned strings | 4293 | nor @code{next-selection-coding-system} is set, the resultant strings |
| 4307 | are additionally decoded using the appropriate coding system for those | 4294 | are decoded by the proper coding systems for those targets: |
| 4308 | data types: @code{iso-8859-1}, @code{compound-text-with-extensions} | 4295 | @code{iso-8859-1}, @code{compound-text-with-extensions} and |
| 4309 | and @code{utf-8} respectively. | 4296 | @code{utf-8} respectively. |
| 4310 | 4297 | ||
| 4311 | In addition to the targets specified above (and the many targets | 4298 | In addition to the targets specified above (and the many targets |
| 4312 | used by various programs for their own purposes), several popular | 4299 | used by various programs for their own purposes), several popular |
| 4313 | programs and toolkits have decided to define selection data types of | 4300 | programs and toolkits have defined selection data types of their own, |
| 4314 | their own, without consulting the appropriate X standards bodies. | 4301 | without consulting the appropriate X standards bodies. These targets |
| 4315 | These targets are usually named after MIME types, such as | 4302 | are generally named after such MIME types as @code{text/html} or |
| 4316 | @code{text/html} or @code{image/jpeg}, and have been known to contain: | 4303 | @code{image/jpeg}; they have been witnessed returning the following |
| 4304 | forms of data: | ||
| 4317 | 4305 | ||
| 4318 | @itemize @bullet | 4306 | @itemize @bullet |
| 4319 | @item | 4307 | @item |
| @@ -4324,54 +4312,56 @@ names of an image or text file. | |||
| 4324 | Image or text data in the appropriate format. | 4312 | Image or text data in the appropriate format. |
| 4325 | 4313 | ||
| 4326 | @item | 4314 | @item |
| 4327 | @code{file://} URIs (or possibly newline or NUL terminated lists of | 4315 | @code{file://} URIs (or conceivably newline or NUL terminated lists of |
| 4328 | URIs) leading to files in the appropriate format. | 4316 | URIs) identifying files in the appropriate format. |
| 4329 | @end itemize | 4317 | @end itemize |
| 4330 | 4318 | ||
| 4331 | These selection targets were first used by Netscape, but are now | 4319 | These selection targets were first used by Netscape, but are now |
| 4332 | found in all kinds of programs, especially those based on recent | 4320 | proffered by all kinds of programs, especially those based on recent |
| 4333 | versions of the GTK+ or Qt toolkits. | 4321 | versions of the GTK+ or Qt toolkits. |
| 4334 | 4322 | ||
| 4335 | Emacs is also capable of acting as a selection owner. When | 4323 | Emacs is also capable of serving as a selection owner. When |
| 4336 | @code{gui-set-selection} is called, the selection data specified is | 4324 | @code{gui-set-selection} is called, the selection data provided is |
| 4337 | not transferred to the X server; instead, Emacs records it internally | 4325 | recorded internally and Emacs obtains ownership of the selection being |
| 4338 | and obtains ownership of the selection. | 4326 | set. |
| 4339 | 4327 | ||
| 4340 | @defvar selection-converter-alist | 4328 | @defvar selection-converter-alist |
| 4341 | Alist of selection targets to ``selection converter'' functions. | 4329 | Alist of selection targets to ``selection converter'' functions. When |
| 4342 | When a selection request is received, Emacs looks up the selection | 4330 | a selection request is received, Emacs looks up the selection |
| 4343 | converter associated with the requested selection target. | 4331 | converter pertaining to the requested selection target. |
| 4344 | 4332 | ||
| 4345 | The selection converter is called with three arguments: the symbol | 4333 | Selection converters are called with three arguments: the symbol |
| 4346 | corresponding to the atom identifying the selection being requested, | 4334 | corresponding to the atom identifying the selection being requested, |
| 4347 | the selection target that is being requested, and the value set with | 4335 | the selection target that is being requested, and the value set with |
| 4348 | @code{gui-set-selection}. The value which it returns is either a cons | 4336 | @code{gui-set-selection}. The values which they must return are |
| 4349 | of a symbol specifying the data type and a number, symbol, or a vector | 4337 | either conses of symbols designating the data type and numbers, |
| 4350 | of numbers or symbols, or its cdr by itself. | 4338 | symbols, vectors of numbers or symbols, or the cdrs of such conses by |
| 4339 | themselves. | ||
| 4351 | 4340 | ||
| 4352 | If the value is the special symbol @code{NULL}, the data type is set | 4341 | If a selection converter's value is the special symbol @code{NULL}, |
| 4353 | to @code{NULL}, and no data is returned to the requestor. | 4342 | the data type returned to its requestor is set to @code{NULL}, and no |
| 4343 | data is sent in response. | ||
| 4354 | 4344 | ||
| 4355 | If the value is a string, it must be a unibyte string; should no | 4345 | If such a value is a string, it must be a unibyte string; should no |
| 4356 | data type be explicitly specified, the data is transferred to the | 4346 | data type be explicitly specified, the data is transferred to its |
| 4357 | requestor with the type @code{STRING}. | 4347 | requestor with the type @code{STRING}. |
| 4358 | 4348 | ||
| 4359 | If the value is a symbol, its ``atom'' is retrieved, and it is | 4349 | If it is a symbol, its ``atom'' is retrieved, and it is transferred to |
| 4360 | transferred to the requestor as a 32-bit value---if no data type was | 4350 | its requestor as a 32-bit value---if no data type is specified, its |
| 4361 | specified, its type is @code{ATOM}. | 4351 | type is @code{ATOM}. |
| 4362 | 4352 | ||
| 4363 | If the value is a number between @code{-32769} and @code{32768}, it | 4353 | If it is a number between @code{-32769} and @code{32768}, it is |
| 4364 | is transferred to the requestor as a 16 bit value---if no data type | 4354 | transferred to its requestor as a 16 bit value---if no data type is |
| 4365 | was specified, its type is @code{INTEGER}. | 4355 | specified, its type is @code{INTEGER}. |
| 4366 | 4356 | ||
| 4367 | If the value is any other number, it is returned as a 32 bit value. | 4357 | If it is any other number, it is accounted a 32 bit value. Even if |
| 4368 | Even if the number returned is unsigned, the requestor will treat | 4358 | the number returned is unsigned, its requestor will treat words of |
| 4369 | words of type @code{INTEGER} as signed. To return an unsigned value, | 4359 | type @code{INTEGER} as signed. To return an unsigned value, specify |
| 4370 | specify the type @code{CARDINAL} instead. | 4360 | the type @code{CARDINAL} in its place. |
| 4371 | 4361 | ||
| 4372 | If the value is a vector of symbols or numbers, it is returned as a | 4362 | If it is a vector of symbols or numbers, the response to its requestor |
| 4373 | list of multiple atoms or numbers. The data type returned by default | 4363 | will be a list of multiple atoms or numbers. The data type returned |
| 4374 | is determined by that of its first element. | 4364 | when not expressly set is that of the list's first element. |
| 4375 | @end defvar | 4365 | @end defvar |
| 4376 | 4366 | ||
| 4377 | By default, Emacs is configured with selection converters for the | 4367 | By default, Emacs is configured with selection converters for the |
| @@ -4481,7 +4471,7 @@ These selection converters are used for internal purposes. | |||
| 4481 | @end table | 4471 | @end table |
| 4482 | 4472 | ||
| 4483 | With the exception of @code{INTEGER}, all selection converters | 4473 | With the exception of @code{INTEGER}, all selection converters |
| 4484 | expect the value given to @code{gui-set-selection} to be one of the | 4474 | expect the data provided to @code{gui-set-selection} to be one of the |
| 4485 | following: | 4475 | following: |
| 4486 | 4476 | ||
| 4487 | @itemize @bullet | 4477 | @itemize @bullet |