summaryrefslogtreecommitdiff
path: root/lisp/w32-fns.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-07-17 15:45:08 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-07-17 15:45:08 +0000
commit3f5c9cad1790b08f123b2bf81aa090b23e416f25 (patch)
treeca2fdda1e0c254f4f033cfa84afb5d62b3001809 /lisp/w32-fns.el
parentdb170c743ed325cbd0ed5c3ab93a1c07a0ec504f (diff)
downloademacs-3f5c9cad1790b08f123b2bf81aa090b23e416f25.tar.gz
* w32-fns.el (x-selection-owner-p): New function.
* mouse.el (mouse-drag-track): Call deactivate-mark earlier. (mouse-yank-at-click): If select-active-regions is non-nil, deactivate the mark before insertion. * simple.el (deactivate-mark, set-mark): Only save selection if we own it.
Diffstat (limited to 'lisp/w32-fns.el')
-rw-r--r--lisp/w32-fns.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index 379dd63eb17..c0aab365070 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -294,12 +294,15 @@ shell requires it (see `w32-shell-dos-semantics')."
;;; Fix interface to (X-specific) mouse.el
(defun x-set-selection (type data)
- (or type (setq type 'PRIMARY))
- (put 'x-selections type data))
+ (put 'x-selections (or type 'PRIMARY) data))
(defun x-get-selection (&optional type data-type)
- (or type (setq type 'PRIMARY))
- (get 'x-selections type))
+ (get 'x-selections (or type 'PRIMARY)))
+
+;; x-selection-owner-p is used in simple.el
+(defun x-selection-owner-p (&optional type)
+ (and (memq type '(nil PRIMARY SECONDARY))
+ (get 'x-selections (or type 'PRIMARY))))
(defun set-w32-system-coding-system (coding-system)
"Set the coding system used by the Windows system to CODING-SYSTEM.