aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2004-07-24 21:53:10 +0000
committerLuc Teirlinck2004-07-24 21:53:10 +0000
commit15a24762a411d82cb4b5ae1305c5ef0d60b130cf (patch)
tree408b13b02ba9328d97a11db0c9146d2d3be2379e
parent7630911d6162623297a052bd75d8866440b73a68 (diff)
downloademacs-15a24762a411d82cb4b5ae1305c5ef0d60b130cf.tar.gz
emacs-15a24762a411d82cb4b5ae1305c5ef0d60b130cf.zip
(x-get-selection, x-set-selection): Doc fixes.
-rw-r--r--lisp/select.el23
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,
35and the argument DATA-TYPE (default `STRING') says 35and the argument DATA-TYPE (default `STRING') says
36how to convert the data. 36how to convert the data.
37 37
38TYPE may be `SECONDARY' or `CLIPBOARD', in addition to `PRIMARY'. 38TYPE may be any symbol \(but nil stands for `PRIMARY'). However,
39only a few symbols are commonly used. They conventionally have
40all upper-case names. The most often used ones, in addition to
41`PRIMARY', are `SECONDARY' and `CLIPBOARD'.
42
39DATA-TYPE is usually `STRING', but can also be one of the symbols 43DATA-TYPE is usually `STRING', but can also be one of the symbols
40in `selection-converter-alist', which see." 44in `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.
60The argument TYPE (default `PRIMARY') says which selection, 64The argument TYPE (nil means `PRIMARY') says which selection, and
61and DATA specifies the contents. DATA may be a string, 65DATA specifies the contents. TYPE must be a symbol. \(It can also
62a symbol, an integer (or a cons of two integers or list of two integers). 66be a string, which stands for the symbol with that name, but this
67is considered obsolete.) DATA may be a string, a symbol, an
68integer (or a cons of two integers or list of two integers).
63 69
64The selection may also be a cons of two markers pointing to the same buffer, 70The selection may also be a cons of two markers pointing to the same buffer,
65or an overlay. In these cases, the selection is considered to be the text 71or 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
70The data may also be a vector of valid non-vector selection values. 76The data may also be a vector of valid non-vector selection values.
71 77
72Interactively, the text of the region is used as the selection value 78The return value is DATA.
73if the prefix arg is set." 79
80Interactively, this command sets the primary selection. Without
81prefix argument, it reads the selection in the minibuffer. With
82prefix 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)))))