diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2009-07-17 15:45:08 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2009-07-17 15:45:08 +0000 |
commit | 3f5c9cad1790b08f123b2bf81aa090b23e416f25 (patch) | |
tree | ca2fdda1e0c254f4f033cfa84afb5d62b3001809 /lisp/w32-fns.el | |
parent | db170c743ed325cbd0ed5c3ab93a1c07a0ec504f (diff) | |
download | emacs-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.el | 11 |
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. |