;; Maintainer: FSF
;; Keywords: internal
-;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;; 2008, 2009 Free Software Foundation, Inc.
;; Based partially on earlier release by Lucid.
;; This file is part of GNU Emacs.
the next communication only. After the communication, this
variable is set to nil.")
+(declare-function x-get-selection-internal "xselect.c"
+ (selection-symbol target-type &optional time-stamp))
+
;; This is for temporary compatibility with pre-release Emacs 19.
(defalias 'x-selection 'x-get-selection)
(defun x-get-selection (&optional type data-type)
selection-coding-system
(cond ((eq data-type 'UTF8_STRING)
'utf-8)
- ((eq data-type 'COMPOUND-TEXT)
+ ((eq data-type 'COMPOUND_TEXT)
'compound-text-with-extensions)
((eq data-type 'C_STRING)
nil)
"Return text pasted to the clipboard."
(x-get-selection-internal 'CLIPBOARD 'STRING))
+(declare-function x-own-selection-internal "xselect.c"
+ (selection-name selection-value))
+(declare-function x-disown-selection-internal "xselect.c"
+ (selection &optional time))
+
(defun x-set-selection (type data)
"Make an X Windows selection of type TYPE and value DATA.
The argument TYPE (nil means `PRIMARY') says which selection, and
(declare-function x-get-cut-buffer-internal "xselect.c")
(defun x-get-cut-buffer (&optional which-one)
- "Returns the value of one of the 8 X server cut-buffers.
+ "Return the value of one of the 8 X server cut-buffers.
Optional arg WHICH-ONE should be a number from 0 to 7, defaulting to 0.
Cut buffers are considered obsolete; you should use selections instead."
(x-get-cut-buffer-internal
this means the previous value of the primary cut buffer moves to the second
cut buffer, and the second to the third, and so on (there are 8 buffers.)
Cut buffers are considered obsolete; you should use selections instead."
- (or (stringp string) (signal 'wrong-type-argument (list 'string string)))
+ (or (stringp string) (signal 'wrong-type-argument (list 'stringp string)))
(if push
(x-rotate-cut-buffers-internal 1))
(x-store-cut-buffer-internal 'CUT_BUFFER0 string))
\f
-;;; Functions to convert the selection into various other selection types.
-;;; Every selection type that Emacs handles is implemented this way, except
-;;; for TIMESTAMP, which is a special case.
+;; Functions to convert the selection into various other selection types.
+;; Every selection type that Emacs handles is implemented this way, except
+;; for TIMESTAMP, which is a special case.
(defun xselect-convert-to-string (selection type value)
(let (str coding)