]> code.delx.au - gnu-emacs/blobdiff - lisp/select.el
(proced-after-send-signal-hook): Use defcustom.
[gnu-emacs] / lisp / select.el
index fb2eedf7f9c1743003c3eea1caf191866d69f989..979189997c3a37921002465c3f9ec4d25a34b992 100644 (file)
@@ -3,8 +3,8 @@
 ;; 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.
@@ -64,6 +64,9 @@ other X clients.  But, if this variable is set, it is used for
 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)
@@ -88,7 +91,7 @@ in `selection-converter-alist', which see."
                       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)
@@ -106,6 +109,11 @@ in `selection-converter-alist', which see."
   "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
@@ -174,7 +182,7 @@ prefix argument, it uses the text of the region as the selection value ."
 (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
@@ -193,15 +201,15 @@ If PUSH is non-nil, also rotate the cut buffers:
 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)