Browse Source

Protect the call to x-selection-value.

Carsten Dominik 17 years ago
parent
commit
e6590eed4d
2 changed files with 7 additions and 1 deletions
  1. 5 0
      ChangeLog
  2. 2 1
      lisp/org-remember.el

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-04-21  Carsten Dominik  <dominik@science.uva.nl>
+
+	* lisp/org-remember.el (org-get-x-clipboard): Protect the call to
+	`x-selection-value'. 
+
 2008-04-16  Jason Riedy  <jason@acm.org>
 
 	* lisp/org-table.el (orgtbl-to-generic): Add a :remove-nil-lines

+ 2 - 1
lisp/org-remember.el

@@ -280,7 +280,8 @@ RET at beg-of-buf -> Append to file as level 2 headline
   (if (eq window-system 'x)
       (let ((x (if org-xemacs-p
 		   (org-no-warnings (get-selection-no-error value))
-		 (x-selection-value value))))
+		 (and (fboundp 'x-selection-value)
+		      (x-selection-value value)))))
 	(and (> (length x) 0) (set-text-properties 0 (length x) nil x) x))))
 
 ;;;###autoload