diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-11-20 23:15:55 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-11-20 23:15:55 +0000 |
commit | 7e70277878e831b52e0231fea1cb918c673684fa (patch) | |
tree | df673a022cbc84a2291a651638f886a733adb30f /lisp/faces.el | |
parent | 945a381a465383e40cf85057935cfae78afec3e4 (diff) | |
download | emacs-7e70277878e831b52e0231fea1cb918c673684fa.tar.gz |
(face-color-supported-p): Return nil if no window system.
Diffstat (limited to 'lisp/faces.el')
-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." ;; Assuming COLOR is a valid color name, ;; return t if it can be displayed on FRAME. (defun face-color-supported-p (frame color background-p) - (or (x-display-color-p frame) - ;; A black-and-white display can implement these. - (member color '("black" "white")) - ;; A black-and-white display can fake gray for background. - (and background-p - (face-color-gray-p color frame)) - ;; A grayscale display can implement colors that are gray (more or less). - (and (x-display-grayscale-p frame) - (face-color-gray-p color frame)))) + (and window-system + (or (x-display-color-p frame) + ;; A black-and-white display can implement these. + (member color '("black" "white")) + ;; A black-and-white display can fake gray for background. + (and background-p + (face-color-gray-p color frame)) + ;; A grayscale display can implement colors that are gray (more or less). + (and (x-display-grayscale-p frame) + (face-color-gray-p color frame))))) ;; Use FUNCTION to store a color in FACE on FRAME. ;; COLORS is either a single color or a list of colors. |