]> code.delx.au - gnu-emacs/blobdiff - lisp/w32-common-fns.el
* lisp/emacs-lisp/smie.el (smie--matching-block-data): Invalidate the
[gnu-emacs] / lisp / w32-common-fns.el
index 9f3501a01d7422f0bdf72db32a4ee45b326b231e..6b1c3ac976ec932b5e417be01f0d3f827c60f1b3 100644 (file)
@@ -23,6 +23,8 @@
 ;;; and Cygwin Emacs compiled to use the native Windows widget
 ;;; library.
 
+(declare-function x-server-version "w32fns.c" (&optional terminal))
+
 (defun w32-version ()
   "Return the MS-Windows version numbers.
 The value is a list of three integers: the major and minor version
@@ -100,6 +102,7 @@ in `selection-converter-alist', which see."
 ;; current selection against it, and avoid passing back our own text
 ;; from x-selection-value.
 (defvar x-last-selected-text nil)
+(defvar x-select-enable-clipboard)
 
 (defun x-get-selection-value ()
   "Return the value of the current selection.
@@ -107,9 +110,8 @@ Consult the selection.  Treat empty strings as if they were unset."
   (if x-select-enable-clipboard
       (let (text)
        ;; Don't die if x-get-selection signals an error.
-       (condition-case c
-           (setq text (w32-get-clipboard-data))
-         (error (message "w32-get-clipboard-data:%s" c)))
+       (with-demoted-errors "w32-get-clipboard-data:%s"
+         (setq text (w32-get-clipboard-data)))
        (if (string= text "") (setq text nil))
        (cond
         ((not text) nil)