Mercurial > emacs
comparison lisp/faces.el @ 27571:4a4f7f602836
(display-color-p): Use framep-on-display.
(display-grayscale-p): New function.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Wed, 02 Feb 2000 11:36:45 +0000 |
parents | 6838a53d4992 |
children | a3d981ee3185 |
comparison
equal
deleted
inserted
replaced
27570:33c77685f4a2 | 27571:4a4f7f602836 |
---|---|
1199 (defun display-color-p (&optional display) | 1199 (defun display-color-p (&optional display) |
1200 "Return t if DISPLAY supports color. | 1200 "Return t if DISPLAY supports color. |
1201 The optional argument DISPLAY specifies which display to ask about. | 1201 The optional argument DISPLAY specifies which display to ask about. |
1202 DISPLAY should be either a frame or a display name (a string). | 1202 DISPLAY should be either a frame or a display name (a string). |
1203 If omitted or nil, that stands for the selected frame's display." | 1203 If omitted or nil, that stands for the selected frame's display." |
1204 (if (and (stringp display) (not (fboundp 'x-display-list))) | 1204 (if (memq (framep-on-display display) '(x w32)) |
1205 nil | 1205 (xw-display-color-p display) |
1206 (if (memq (framep (or display (selected-frame))) '(x w32)) | 1206 (tty-display-color-p display))) |
1207 (xw-display-color-p display) | |
1208 (tty-display-color-p display)))) | |
1209 (defalias 'x-display-color-p 'display-color-p) | 1207 (defalias 'x-display-color-p 'display-color-p) |
1208 | |
1209 (defun display-grayscale-p (&optional display) | |
1210 "Return non-nil if frames on DISPLAY can display shades of gray." | |
1211 (let ((frame-type (framep-on-display display))) | |
1212 (cond | |
1213 ((memq frame-type '(x w32 mac)) | |
1214 (x-display-grayscale-p display)) | |
1215 (t | |
1216 (> (tty-color-gray-shades display) 2))))) | |
1210 | 1217 |
1211 | 1218 |
1212 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1219 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1213 ;;; Background mode. | 1220 ;;; Background mode. |
1214 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1221 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |