;;; w32-common-fns.el --- Lisp routines for Windows and Cygwin-w32
-;; Copyright (C) 1994, 2001-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;; 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
`PRIMARY', are `SECONDARY' and `CLIPBOARD'.
DATA-TYPE is usually `STRING', but can also be one of the symbols
-in `selection-converter-alist', which see."
+in `selection-converter-alist', which see. This argument is
+ignored on MS-Windows and MS-DOS."
(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 x-selection-owner-p (&optional selection _terminal)
+ "" ; placeholder for doc.c
+ (and (memq selection '(nil PRIMARY SECONDARY))
+ (get 'x-selections (or selection 'PRIMARY))))
;; The "Windows" keys on newer keyboards bring up the Start menu
;; whether you want it or not - make Emacs ignore these keystrokes
;; 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.
(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)