diff options
| author | Richard M. Stallman | 1995-11-20 23:15:55 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-11-20 23:15:55 +0000 |
| commit | 055ff5a6af3c06faede206e63e9046e4b85b9e6b (patch) | |
| tree | 5c4a3f322d00939cabfc4e5879405024fa41f828 | |
| parent | 8a10f781cff01c6a9f994e37ca27c8e415dd1691 (diff) | |
| download | emacs-055ff5a6af3c06faede206e63e9046e4b85b9e6b.tar.gz emacs-055ff5a6af3c06faede206e63e9046e4b85b9e6b.zip | |
(face-color-supported-p): Return nil if no window system.
| -rw-r--r-- | lisp/faces.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 8d21556aed7..b4071cd4797 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1176,15 +1176,16 @@ selected frame." | |||
| 1176 | ;; Assuming COLOR is a valid color name, | 1176 | ;; Assuming COLOR is a valid color name, |
| 1177 | ;; return t if it can be displayed on FRAME. | 1177 | ;; return t if it can be displayed on FRAME. |
| 1178 | (defun face-color-supported-p (frame color background-p) | 1178 | (defun face-color-supported-p (frame color background-p) |
| 1179 | (or (x-display-color-p frame) | 1179 | (and window-system |
| 1180 | ;; A black-and-white display can implement these. | 1180 | (or (x-display-color-p frame) |
| 1181 | (member color '("black" "white")) | 1181 | ;; A black-and-white display can implement these. |
| 1182 | ;; A black-and-white display can fake gray for background. | 1182 | (member color '("black" "white")) |
| 1183 | (and background-p | 1183 | ;; A black-and-white display can fake gray for background. |
| 1184 | (face-color-gray-p color frame)) | 1184 | (and background-p |
| 1185 | ;; A grayscale display can implement colors that are gray (more or less). | 1185 | (face-color-gray-p color frame)) |
| 1186 | (and (x-display-grayscale-p frame) | 1186 | ;; A grayscale display can implement colors that are gray (more or less). |
| 1187 | (face-color-gray-p color frame)))) | 1187 | (and (x-display-grayscale-p frame) |
| 1188 | (face-color-gray-p color frame))))) | ||
| 1188 | 1189 | ||
| 1189 | ;; Use FUNCTION to store a color in FACE on FRAME. | 1190 | ;; Use FUNCTION to store a color in FACE on FRAME. |
| 1190 | ;; COLORS is either a single color or a list of colors. | 1191 | ;; COLORS is either a single color or a list of colors. |