diff options
Diffstat (limited to 'lisp/term/w32-win.el')
-rw-r--r-- | lisp/term/w32-win.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 5c56d05a140..d8cf5efcfab 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -400,11 +400,15 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") (put 'x-selections (or type 'PRIMARY) value))) (defun w32--get-selection (&optional type data-type) - (if (and (eq type 'CLIPBOARD) - (eq data-type 'STRING)) - (with-demoted-errors "w32-get-clipboard-data:%S" - (w32-get-clipboard-data)) - (get 'x-selections (or type 'PRIMARY)))) + (cond ((and (eq type 'CLIPBOARD) + (eq data-type 'STRING)) + (with-demoted-errors "w32-get-clipboard-data:%S" + (w32-get-clipboard-data))) + ((eq data-type 'TARGETS) + (if (eq type 'CLIPBOARD) + (w32-selection-targets type) + (if (get 'x-selections (or type 'PRIMARY)) '[STRING]))) + (t (get 'x-selections (or type 'PRIMARY))))) (defun w32--selection-owner-p (selection) (and (memq selection '(nil PRIMARY SECONDARY)) @@ -466,5 +470,6 @@ That includes all Windows systems except for 9X/Me." (getenv "SystemRoot")) (provide 'w32-win) +(provide 'term/w32-win) ;;; w32-win.el ends here |