diff options
| author | Luc Teirlinck | 2004-07-24 21:53:10 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-07-24 21:53:10 +0000 |
| commit | 15a24762a411d82cb4b5ae1305c5ef0d60b130cf (patch) | |
| tree | 408b13b02ba9328d97a11db0c9146d2d3be2379e | |
| parent | 7630911d6162623297a052bd75d8866440b73a68 (diff) | |
| download | emacs-15a24762a411d82cb4b5ae1305c5ef0d60b130cf.tar.gz emacs-15a24762a411d82cb4b5ae1305c5ef0d60b130cf.zip | |
(x-get-selection, x-set-selection): Doc fixes.
| -rw-r--r-- | lisp/select.el | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lisp/select.el b/lisp/select.el index c095ea50c44..565ddd7d22e 100644 --- a/lisp/select.el +++ b/lisp/select.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Maintainer: FSF | 3 | ;; Maintainer: FSF |
| 4 | ;; Keywords: internal | 4 | ;; Keywords: internal |
| 5 | 5 | ||
| 6 | ;; Copyright (c) 1993, 1994 Free Software Foundation, Inc. | 6 | ;; Copyright (c) 1993, 1994, 2004 Free Software Foundation, Inc. |
| 7 | ;; Based partially on earlier release by Lucid. | 7 | ;; Based partially on earlier release by Lucid. |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -35,7 +35,11 @@ The argument TYPE (default `PRIMARY') says which selection, | |||
| 35 | and the argument DATA-TYPE (default `STRING') says | 35 | and the argument DATA-TYPE (default `STRING') says |
| 36 | how to convert the data. | 36 | how to convert the data. |
| 37 | 37 | ||
| 38 | TYPE may be `SECONDARY' or `CLIPBOARD', in addition to `PRIMARY'. | 38 | TYPE may be any symbol \(but nil stands for `PRIMARY'). However, |
| 39 | only a few symbols are commonly used. They conventionally have | ||
| 40 | all upper-case names. The most often used ones, in addition to | ||
| 41 | `PRIMARY', are `SECONDARY' and `CLIPBOARD'. | ||
| 42 | |||
| 39 | DATA-TYPE is usually `STRING', but can also be one of the symbols | 43 | DATA-TYPE is usually `STRING', but can also be one of the symbols |
| 40 | in `selection-converter-alist', which see." | 44 | in `selection-converter-alist', which see." |
| 41 | (let ((data (x-get-selection-internal (or type 'PRIMARY) | 45 | (let ((data (x-get-selection-internal (or type 'PRIMARY) |
| @@ -57,9 +61,11 @@ in `selection-converter-alist', which see." | |||
| 57 | 61 | ||
| 58 | (defun x-set-selection (type data) | 62 | (defun x-set-selection (type data) |
| 59 | "Make an X Windows selection of type TYPE and value DATA. | 63 | "Make an X Windows selection of type TYPE and value DATA. |
| 60 | The argument TYPE (default `PRIMARY') says which selection, | 64 | The argument TYPE (nil means `PRIMARY') says which selection, and |
| 61 | and DATA specifies the contents. DATA may be a string, | 65 | DATA specifies the contents. TYPE must be a symbol. \(It can also |
| 62 | a symbol, an integer (or a cons of two integers or list of two integers). | 66 | be a string, which stands for the symbol with that name, but this |
| 67 | is considered obsolete.) DATA may be a string, a symbol, an | ||
| 68 | integer (or a cons of two integers or list of two integers). | ||
| 63 | 69 | ||
| 64 | The selection may also be a cons of two markers pointing to the same buffer, | 70 | The selection may also be a cons of two markers pointing to the same buffer, |
| 65 | or an overlay. In these cases, the selection is considered to be the text | 71 | or an overlay. In these cases, the selection is considered to be the text |
| @@ -69,8 +75,11 @@ can alter the effective value of the selection. | |||
| 69 | 75 | ||
| 70 | The data may also be a vector of valid non-vector selection values. | 76 | The data may also be a vector of valid non-vector selection values. |
| 71 | 77 | ||
| 72 | Interactively, the text of the region is used as the selection value | 78 | The return value is DATA. |
| 73 | if the prefix arg is set." | 79 | |
| 80 | Interactively, this command sets the primary selection. Without | ||
| 81 | prefix argument, it reads the selection in the minibuffer. With | ||
| 82 | prefix argument, it uses the text of the region as the selection value ." | ||
| 74 | (interactive (if (not current-prefix-arg) | 83 | (interactive (if (not current-prefix-arg) |
| 75 | (list 'PRIMARY (read-string "Set text for pasting: ")) | 84 | (list 'PRIMARY (read-string "Set text for pasting: ")) |
| 76 | (list 'PRIMARY (buffer-substring (region-beginning) (region-end))))) | 85 | (list 'PRIMARY (buffer-substring (region-beginning) (region-end))))) |