import -ko -b 1.1.3 XEmacs XEmacs-21_2 r21-2-35
[chise/xemacs-chise.git.1] / lisp / x-select.el
index adfec7f..3b3a598 100644 (file)
@@ -50,6 +50,9 @@
   'select-make-extent-for-selection)
 (define-obsolete-function-alias 'x-cut-copy-clear-internal 'cut-copy-clear-internal)
 (define-obsolete-function-alias 'x-get-selection 'get-selection)
+(define-obsolete-function-alias 'x-get-clipboard 'get-clipboard)
+(define-obsolete-function-alias 'x-yank-clipboard-selection 
+  'yank-clipboard-selection)
 (define-obsolete-function-alias 'x-disown-selection-internal
   'disown-selection-internal)
 
   "Return text selected from some X window."
   (get-selection 'SECONDARY))
 
-(defun x-get-clipboard ()
-  "Return text pasted to the clipboard."
-  (get-selection 'CLIPBOARD))
-
 (defun x-own-secondary-selection (selection &optional type)
   "Make a secondary X Selection of the given argument.  The argument may be a
 string or a cons of two markers (in which case the selection is considered to
@@ -89,36 +88,6 @@ be the text between those markers)."
 ;(setq x-sent-selection-hooks 'x-notice-selection-failures)
 
 \f
-;;; Selections in killed buffers
-;;; this function is called by kill-buffer as if it were on the
-;;; kill-buffer-hook (though it isn't really).
-
-(defun xselect-kill-buffer-hook ()
-  ;; Probably the right thing is to write a C function to return a list
-  ;; of the selections which emacs owns, since it could conceivably own
-  ;; a user-defined selection type that we've never heard of.
-  (xselect-kill-buffer-hook-1 'PRIMARY)
-  (xselect-kill-buffer-hook-1 'SECONDARY)
-  (xselect-kill-buffer-hook-1 'CLIPBOARD))
-
-(defun xselect-kill-buffer-hook-1 (selection)
-  (let (value)
-    (if (and (selection-owner-p selection)
-            (setq value (get-selection-internal selection '_EMACS_INTERNAL))
-            ;; The _EMACS_INTERNAL selection type has a converter registered
-            ;; for it that does no translation.  This only works if emacs is
-            ;; requesting the selection from itself.  We could have done this
-            ;; by writing a C function to return the raw selection data, and
-            ;; that might be the right way to do this, but this was easy.
-            (or (and (consp value)
-                     (markerp (car value))
-                     (eq (current-buffer) (marker-buffer (car value))))
-                (and (extent-live-p value)
-                     (eq (current-buffer) (extent-object value)))
-                 (and (extentp value) (not (extent-live-p value)))))
-       (disown-selection-internal selection))))
-
-\f
 ;;; Cut Buffer support
 
 ;;; FSF name x-get-cut-buffer
@@ -154,19 +123,6 @@ into Emacs."
         (x-store-cutbuffer-internal 'CUT_BUFFER0 string))))
 
 \f
-;;; Random utility functions
-
-(defun x-yank-clipboard-selection ()
-  "Insert the current Clipboard selection at point."
-  (interactive "*")
-  (setq last-command nil)
-  (setq this-command 'yank) ; so that yank-pop works.
-  (let ((clip (x-get-clipboard)))
-    (or clip (error "there is no clipboard selection"))
-    (push-mark)
-    (insert clip)))
-\f
-
 ;FSFmacs (provide 'select)
 
 ;;; x-select.el ends here.