summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-10-26 18:13:52 +0000
committerRichard M. Stallman <rms@gnu.org>1996-10-26 18:13:52 +0000
commitaa952edc8e02efd6fd3fcf18d5768d5022feed8a (patch)
tree5f7011540c108d2e0d90f330eefc5e75740bffe2
parenta4a0f4cfa3df5045333e7cfa1caa3f63e0700d54 (diff)
downloademacs-aa952edc8e02efd6fd3fcf18d5768d5022feed8a.tar.gz
(mouse-sel-set-selection-function): Doc fix.
Use x-select-text, for the primary selection. (mouse-sel-get-selection-function): Use x-cut-buffer-or-selection-value, for the primary selection.
-rw-r--r--lisp/mouse-sel.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index d3a63095bbc..fdcd9a3e623 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -185,17 +185,24 @@ where SELECTION-NAME = name of selection
type for this selection should be stored.")
(defvar mouse-sel-set-selection-function
- (if (fboundp 'x-set-selection)
- 'x-set-selection)
+ (function (lambda (selection value)
+ (if (eq selection 'PRIMARY)
+ (x-select-text value)
+ (x-set-selection selection value))))
"Function to call to set selection.
Called with two arguments:
SELECTION, the name of the selection concerned, and
- VALUE, the text to store.")
+ VALUE, the text to store.
+This sets the selection as well as the cut buffer for the older applications.
+Use (setq mouse-sel-set-selection-function 'x-set-selection) if you don't care
+for them.")
(defvar mouse-sel-get-selection-function
- (if (fboundp 'x-get-selection)
- 'x-get-selection)
+ (function (lambda (selection)
+ (if (eq selection 'PRIMARY)
+ (x-cut-buffer-or-selection-value)
+ (x-get-selection selection))))
"Function to call to get the selection.
Called with one argument: