Index: pc-win.el =================================================================== RCS file: /sources/emacs/emacs/lisp/term/pc-win.el,v retrieving revision 1.45 diff -U 8 -d -r1.45 pc-win.el --- pc-win.el 8 Jan 2008 20:45:45 -0000 1.45 +++ pc-win.el 7 Feb 2008 17:48:45 -0000 @@ -171,54 +171,54 @@ ;; From lisp/term/w32-win.el ; ;;;; 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) +(defvar msdos-last-selected-text nil) -(defcustom x-select-enable-clipboard t +(defcustom msdos-select-enable-clipboard t "Non-nil means cutting and pasting uses the clipboard. This is the default on this system, since MS-Windows does not support other types of selections." :type 'boolean :group 'killing) -(defun x-select-text (text &optional push) - (if x-select-enable-clipboard +(defun msdos-select-text (text &optional push) + (if msdos-select-enable-clipboard (w16-set-clipboard-data text)) - (setq x-last-selected-text text)) + (setq msdos-last-selected-text text)) ;;; Return the value of the current selection. ;;; Consult the selection, then the cut buffer. Treat empty strings ;;; as if they were unset. -(defun x-get-selection-value () - (if x-select-enable-clipboard +(defun msdos-get-selection-value () + (if msdos-select-enable-clipboard (let (text) ;; Don't die if x-get-selection signals an error. (condition-case c (setq text (w16-get-clipboard-data)) (error (message "w16-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) + ((eq text msdos-last-selected-text) nil) + ((string= text msdos-last-selected-text) ;; Record the newer string, so subsequent calls can use the 'eq' test. - (setq x-last-selected-text text) + (setq msdos-last-selected-text text) nil) (t - (setq x-last-selected-text text)))))) + (setq msdos-last-selected-text text)))))) ;;; 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) +(setq interprogram-cut-function 'msdos-select-text) +(setq interprogram-paste-function 'msdos-get-selection-value) ;; From lisp/faces.el: we only have one font, so always return ;; it, no matter which variety they've asked for. (defun x-frob-font-slant (font which) font) (make-obsolete 'x-frob-font-slant 'make-face-... "21.1") (defun x-frob-font-weight (font which) font)