summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vorobiev <alexander.vorobiev@gmail.com>2013-11-17 18:27:14 -0600
committerBastien Guerry <bzg@altern.org>2013-11-22 10:52:41 +0100
commitb88b5d4fd17728b84c8c7e3a0043e6eb8869dba0 (patch)
tree5a2246667989bbc73c8453ed5038aaaa9c0573cd
parent23e6c72133b690711ab0247ae5b15ada4ad2a7e8 (diff)
downloadorg-mode-b88b5d4fd17728b84c8c7e3a0043e6eb8869dba0.tar.gz
org-compat: Support for getting data from Windows clipboard
* lisp/org-compat.el (org-get-x-clipboard): Use w32-get-clipboard-data to get the clipboard data under Windows. TINYCHANGE
-rw-r--r--lisp/org-compat.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index b714f13..a3eb960 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -190,10 +190,12 @@ If DELETE is non-nil, delete all those overlays."
found))
(defun org-get-x-clipboard (value)
- "Get the value of the x clipboard, compatible with XEmacs, and GNU Emacs 21."
- (if (eq window-system 'x)
- (let ((x (org-get-x-clipboard-compat value)))
- (if x (org-no-properties x)))))
+ "Get the value of the x or Windows clipboard, compatible with XEmacs, and GNU Emacs 21."
+ (cond ((eq window-system 'x)
+ (let ((x (org-get-x-clipboard-compat value)))
+ (if x (org-no-properties x))))
+ ((and (eq window-system 'w32) (fboundp 'w32-get-clipboard-data))
+ (w32-get-clipboard-data))))
(defsubst org-decompose-region (beg end)
"Decompose from BEG to END."