;;; common-win.el --- common part of handling window systems
-;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: terminals
On Nextstep, put TEXT in the pasteboard (`x-select-enable-clipboard'
is not used)."
- (cond ((eq system-type 'windows-nt)
+ (cond ((eq (framep (selected-frame)) 'w32)
(if x-select-enable-clipboard
(w32-set-clipboard-data text))
(setq x-last-selected-text text))
;;; (cons (logior (lsh 0 16) 9) 'ns-insert-working-text)
;;; (cons (logior (lsh 0 16) 10) 'ns-delete-working-text)
(cons (logior (lsh 0 16) 11) 'ns-spi-service-call)
-;;; (cons (logior (lsh 0 16) 12) 'ns-new-frame)
+ (cons (logior (lsh 0 16) 12) 'ns-new-frame)
(cons (logior (lsh 0 16) 13) 'ns-toggle-toolbar)
-;;; (cons (logior (lsh 0 16) 14) 'ns-show-prefs)
+ (cons (logior (lsh 0 16) 14) 'ns-show-prefs)
))))
(set-terminal-parameter frame 'x-setup-function-keys t)))
;; The ordering of the colors is chosen for the user's convenience in
;; `list-colors-display', which displays the reverse of this list.
;; Roughly speaking, `list-colors-display' orders by (i) named shades
-;; of grey with hue 0.0, sorted by value (ii) named colors with
+;; of gray with hue 0.0, sorted by value (ii) named colors with
;; saturation 1.0, sorted by hue, (iii) named non-white colors with
;; saturation less than 1.0, sorted by hue, (iv) other named shades of
;; white, (v) numbered colors sorted by hue, and (vi) numbered shades
-;; of grey.
+;; of gray.
(declare-function ns-list-colors "nsfns.m" (&optional frame))
(defun xw-defined-colors (&optional frame)
"Internal function called by `defined-colors', which see."
- (or frame (setq frame (selected-frame)))
- ;; FIXME for ns, this is just... x-colors.
- (let (defined-colors)
- (dolist (this-color (if (eq system-type 'windows-nt)
- (or (mapcar 'car w32-color-map) x-colors)
- x-colors))
- (and (or (color-supported-p this-color frame t)
- (featurep 'ns))
- (setq defined-colors (cons this-color defined-colors))))
- defined-colors))
+ (if (featurep 'ns)
+ x-colors
+ (or frame (setq frame (selected-frame)))
+ (let (defined-colors)
+ (dolist (this-color (if (eq system-type 'windows-nt)
+ (or (mapcar 'car w32-color-map) x-colors)
+ x-colors))
+ (and (color-supported-p this-color frame t)
+ (setq defined-colors (cons this-color defined-colors))))
+ defined-colors)))
;;; common-win.el ends here