summaryrefslogtreecommitdiff
path: root/lisp/term/x-win.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1998-12-16 06:41:52 +0000
committerKarl Heuer <kwzh@gnu.org>1998-12-16 06:41:52 +0000
commit1be7f9b0a59e0382a5155371a8d1cb131ed095fc (patch)
tree1e2f2a959bd5dd1b5bab2f59ddccc993fd5ad43c /lisp/term/x-win.el
parent1f447a50156fdeeaeafa921478de3a278db3507e (diff)
downloademacs-1be7f9b0a59e0382a5155371a8d1cb131ed095fc.tar.gz
emacs-1be7f9b0a59e0382a5155371a8d1cb131ed095fc.tar.bz2
emacs-1be7f9b0a59e0382a5155371a8d1cb131ed095fc.zip
(x-cut-buffer-or-selection-value):
If clipboard is enabled, try it before PRIMARY selection.
Diffstat (limited to 'lisp/term/x-win.el')
-rw-r--r--lisp/term/x-win.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 4728a05eda3..032b6f32e89 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -587,16 +587,6 @@ This is in addition to the primary selection.")
;;; selection won't be added to the kill ring over and over.
(defun x-cut-buffer-or-selection-value ()
(let (text)
-
- ;; Don't die if x-get-selection signals an error.
- (condition-case c
- (setq text (x-get-selection 'PRIMARY 'COMPOUND_TEXT))
- (error nil))
- (if (null text)
- (condition-case c
- (setq text (x-get-selection 'PRIMARY 'STRING))
- (error nil)))
- (if (string= text "") (setq text nil))
(when x-select-enable-clipboard
(if (null text)
(condition-case c
@@ -608,6 +598,17 @@ This is in addition to the primary selection.")
(error nil)))
(if (string= text "") (setq text nil)))
+ ;; Don't die if x-get-selection signals an error.
+ (if (null text)
+ (condition-case c
+ (setq text (x-get-selection 'PRIMARY 'COMPOUND_TEXT))
+ (error nil)))
+ (if (null text)
+ (condition-case c
+ (setq text (x-get-selection 'PRIMARY 'STRING))
+ (error nil)))
+ (if (string= text "") (setq text nil))
+
(or text (setq text (x-get-cut-buffer 0)))
(if (string= text "") (setq text nil))