Initial revision
[bpt/emacs.git] / lisp / select.el
index bfcf20a..85c8d4a 100644 (file)
@@ -24,7 +24,7 @@
 ;;; Code:
 
 ;; This is for temporary compatibility with pre-release Emacs 19.
-(fset 'x-selection 'x-get-selection)
+(defalias 'x-selection 'x-get-selection)
 (defun x-get-selection (&optional type data-type)
   "Return the value of an X Windows selection.
 The argument TYPE (default `PRIMARY') says which selection, 
@@ -102,14 +102,16 @@ Cut buffers are considered obsolete; you should use selections instead."
             which-one)
      'CUT_BUFFER0)))
 
-(defun x-set-cut-buffer (string)
+(defun x-set-cut-buffer (string &optional push)
   "Store STRING into the X server's primary cut buffer.
-The previous value of the primary cut buffer is rotated to the secondary
+If PUSH is non-nil, also rotate the cut buffers:
+this means the previous value of the primary cut buffer moves 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."
   ;; Check the data type of STRING.
   (substring string 0 0)
-  (x-rotate-cut-buffers-internal 1)
+  (if push
+      (x-rotate-cut-buffers-internal 1))
   (x-store-cut-buffer-internal 'CUT_BUFFER0 string))
 
 \f
@@ -262,7 +264,7 @@ Cut buffers are considered obsolete; you should use selections instead."
   (user-full-name))
 
 (defun xselect-convert-to-class (selection type size)
-  x-emacs-application-class)
+  "Emacs")
 
 ;; We do not try to determine the name Emacs was invoked with,
 ;; because it is not clean for a program's behavior to depend on that.