Mercurial > emacs
comparison lisp/select.el @ 17012:f1932b36f01d
(x-get-selection): Set default data-type of selection
to COMPOUND_TEXT.
(selection-converter-alist): Add an entry for COMPOUND_TEXT.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 20 Feb 1997 05:49:58 +0000 |
parents | 83f275dcd93a |
children | fffebc19fe53 |
comparison
equal
deleted
inserted
replaced
17011:d6a6cfeb9904 | 17012:f1932b36f01d |
---|---|
27 ;; This is for temporary compatibility with pre-release Emacs 19. | 27 ;; This is for temporary compatibility with pre-release Emacs 19. |
28 (defalias 'x-selection 'x-get-selection) | 28 (defalias 'x-selection 'x-get-selection) |
29 (defun x-get-selection (&optional type data-type) | 29 (defun x-get-selection (&optional type data-type) |
30 "Return the value of an X Windows selection. | 30 "Return the value of an X Windows selection. |
31 The argument TYPE (default `PRIMARY') says which selection, | 31 The argument TYPE (default `PRIMARY') says which selection, |
32 and the argument DATA-TYPE (default `STRING') says how to convert the data." | 32 and the argument DATA-TYPE (default `COMPOUND_TEXT') says |
33 (x-get-selection-internal (or type 'PRIMARY) (or data-type 'STRING))) | 33 how to convert the data." |
34 (x-get-selection-internal (or type 'PRIMARY) (or data-type 'COMPOUND_TEXT))) | |
34 | 35 |
35 (defun x-get-clipboard () | 36 (defun x-get-clipboard () |
36 "Return text pasted to the clipboard." | 37 "Return text pasted to the clipboard." |
37 (x-get-selection-internal 'CLIPBOARD 'STRING)) | 38 (x-get-selection-internal 'CLIPBOARD 'STRING)) |
38 | 39 |
285 (defun xselect-convert-to-identity (selection type value) ; used internally | 286 (defun xselect-convert-to-identity (selection type value) ; used internally |
286 (vector value)) | 287 (vector value)) |
287 | 288 |
288 (setq selection-converter-alist | 289 (setq selection-converter-alist |
289 '((TEXT . xselect-convert-to-string) | 290 '((TEXT . xselect-convert-to-string) |
291 (COMPOUND_TEXT . xselect-convert-to-string) | |
290 (STRING . xselect-convert-to-string) | 292 (STRING . xselect-convert-to-string) |
291 (TARGETS . xselect-convert-to-targets) | 293 (TARGETS . xselect-convert-to-targets) |
292 (LENGTH . xselect-convert-to-length) | 294 (LENGTH . xselect-convert-to-length) |
293 (DELETE . xselect-convert-to-delete) | 295 (DELETE . xselect-convert-to-delete) |
294 (FILE_NAME . xselect-convert-to-filename) | 296 (FILE_NAME . xselect-convert-to-filename) |