]> code.delx.au - gnu-emacs/blobdiff - lisp/term/pc-win.el
* lisp/subr.el (purecopy-cons, purecopy-car): Add shortcuts.
[gnu-emacs] / lisp / term / pc-win.el
index 332e151a86f88cdcc3003026c7caa92bdd33ea93..4cb88f6bd234b0f17652b1bb1c22a65ece09bde9 100644 (file)
@@ -1,7 +1,7 @@
 ;;; pc-win.el --- setup support for `PC windows' (whatever that is)
 
-;; Copyright (C) 1994, 1996, 1997, 1999, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1996-1997, 1999, 2001-2011
+;;   Free Software Foundation, Inc.
 
 ;; Author: Morten Welinder <terra@diku.dk>
 ;; Maintainer: FSF
@@ -181,34 +181,54 @@ created."
 
 ;; From lisp/term/x-win.el
 (defvar x-display-name "pc"
-  "The display name specifying the MS-DOS display and frame type.")
+  "The name of the window display on which Emacs was started.
+On X, the display name of individual X frames is recorded in the
+`display' frame parameter.")
 (defvar x-colors (mapcar 'car msdos-color-values)
-  "The list of colors available on a PC display under MS-DOS.")
+  "List of basic colors available on color displays.
+For X, the list comes from the `rgb.txt' file,v 10.41 94/02/20.
+For Nextstep, this is a list of non-PANTONE colors returned by
+the operating system.")
 
 ;; From lisp/term/w32-win.el
 ;
-;;;; Selections and cut buffers
+;;;; Selections
 ;
 ;;; 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.
+;;; from x-selection-value.
 (defvar x-last-selected-text nil)
 
 (defcustom x-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."
+This is in addition to, but in preference to, the primary selection.
+
+Note that MS-Windows does not support selection types other than the
+clipboard.  (The primary selection that is set by Emacs is not
+accessible to other programs on MS-Windows.)
+
+This variable is not used by the Nextstep port."
   :type 'boolean
   :group 'killing)
 
-(defun x-select-text (text &optional push)
+(defun x-select-text (text)
+  "Select TEXT, a string, according to the window system.
+
+On X, if `x-select-enable-clipboard' is non-nil, copy TEXT to the
+clipboard.  If `x-select-enable-primary' is non-nil, put TEXT in
+the primary selection.
+
+On Windows, make TEXT the current selection.  If
+`x-select-enable-clipboard' is non-nil, copy the text to the
+clipboard as well.
+
+On Nextstep, put TEXT in the pasteboard."
   (if x-select-enable-clipboard
       (w16-set-clipboard-data text))
   (setq x-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.
+;;; Consult the selection.  Treat empty strings as if they were unset.
 (defun x-get-selection-value ()
   (if x-select-enable-clipboard
       (let (text)
@@ -268,14 +288,15 @@ Disowning it means there is no such selection."
   (if (x-selection-owner-p selection)
       t))
 
-;; 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)
-(make-obsolete 'x-frob-font-weight 'make-face-... "21.1")
+;; x-get-selection-internal is used in select.el
+(defun x-get-selection-internal (selection type &optional time_stamp)
+  "Return text selected from some X window.
+SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
+\(Those are literal upper-case symbol names, since that's what X expects.)
+TYPE is the type of data desired, typically `STRING'.
+TIME_STAMP is the time to use in the XConvertSelection call for foreign
+selections.  If omitted, defaults to the time for the last event."
+  (x-get-selection-value))
 
 ;; From src/fontset.c:
 (fset 'query-fontset 'ignore)
@@ -399,5 +420,4 @@ Errors out because it is not supposed to be called, ever."
 
 (provide 'pc-win)
 
-;; arch-tag: 5cbdb455-b495-427b-95d0-e417d77d00b4
 ;;; pc-win.el ends here