]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove stuff about selection timeout, which is
authorAndrew Innes <andrewi@gnu.org>
Fri, 8 Dec 2000 14:34:15 +0000 (14:34 +0000)
committerAndrew Innes <andrewi@gnu.org>
Fri, 8 Dec 2000 14:34:15 +0000 (14:34 +0000)
irrelevant on Windows.  Move clipboard support to w32-fns.el, so
it is accessible in -nw mode.

lisp/ChangeLog
lisp/term/w32-win.el

index 67647818c2c5b4c643333659e2d974a65534d1ba..34d63e4b520fbb2a3eab72b2393497cf4cb1c1bf 100644 (file)
@@ -1,3 +1,12 @@
+2000-12-08  Andrew Innes  <andrewi@gnu.org>
+
+       * w32-fns.el: Add clipboard support from term/w32-win.el, so it is
+       accessible in -nw mode.
+
+       * term/w32-win.el: Remove stuff about selection timeout, which is
+       irrelevant on Windows.  Move clipboard support to w32-fns.el, so
+       it is accessible in -nw mode.
+
 2000-12-08  Dave Love  <fx@gnu.org>
 
        * emacs-lisp/lisp-mode.el (lisp-mode): Set
index 7db6b475abdc251a4bc58792913d6f344e025ce3..71e7f56256b3a62d1634046b36b6af62c41b1d33 100644 (file)
@@ -553,56 +553,6 @@ This returns ARGS with the arguments that have been processed removed."
 (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
                           global-map)
 
-\f
-;;;; Selections and cut buffers
-
-;;; We keep track of the last text selected here, so we can check the
-;;; current selection against it, and avoid passing back our own text
-;;; from x-cut-buffer-or-selection-value.
-(defvar x-last-selected-text nil)
-
-;;; It is said that overlarge strings are slow to put into the cut buffer.
-;;; Note this value is overridden below.
-(defvar x-cut-buffer-max 20000
-  "Max number of characters to put in the cut buffer.")
-
-(defcustom x-select-enable-clipboard t
-  "Non-nil means cutting and pasting uses the clipboard.
-This is in addition to the primary selection."
-  :type 'boolean
-  :group 'killing)
-
-(defun x-select-text (text &optional push)
-  "Make TEXT the last selected text.
-If `x-select-enable-clipboard' is non-nil, copy the text to the system
-clipboard as well. Optional PUSH is ignored on Windows."
-  (if x-select-enable-clipboard
-      (w32-set-clipboard-data text))
-  (setq x-last-selected-text text))
-    
-(defun x-get-selection-value ()
-  "Return the value of the current selection.
-Consult the selection, then the cut buffer.  Treat empty strings as if
-they were unset."
-  (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)))
-       (if (string= text "") (setq text nil))
-       (cond
-        ((not text) nil)
-        ((eq text x-last-selected-text) nil)
-        ((string= text x-last-selected-text)
-         ;; Record the newer string, so subsequent calls can use the 'eq' test.
-         (setq x-last-selected-text text)
-         nil)
-        (t
-         (setq x-last-selected-text text))))))
-\f
-(defalias 'x-cut-buffer-or-selection-value 'x-get-selection-value)
-
 \f
 ;;; Do the actual Windows setup here; the above code just defines
 ;;; functions and variables that we use now.
@@ -714,22 +664,11 @@ See the documentation of `create-fontset-from-fontset-spec for the format.")
        (setq default-frame-alist
              (cons '(reverse . t) default-frame-alist)))))
 
-;; Set x-selection-timeout, measured in milliseconds.
-(let ((res-selection-timeout
-       (x-get-resource "selectionTimeout" "SelectionTimeout")))
-  (setq x-selection-timeout 20000)
-  (if res-selection-timeout
-      (setq x-selection-timeout (string-to-number res-selection-timeout))))
-
 (defun x-win-suspend-error ()
   "Report an error when a suspend is attempted."
   (error "Suspending an Emacs running under W32 makes no sense"))
 (add-hook 'suspend-hook 'x-win-suspend-error)
 
-;;; Arrange for the kill and yank functions to set and check the clipboard.
-(setq interprogram-cut-function 'x-select-text)
-(setq interprogram-paste-function 'x-get-selection-value)
-
 ;;; Turn off window-splitting optimization; w32 is usually fast enough
 ;;; that this is only annoying.
 (setq split-window-keep-point t)