# HG changeset patch # User Richard M. Stallman # Date 816909355 0 # Node ID eb141cf52779d4a3c5ca14d8ff172087a50b6c78 # Parent 0f665b0b653fa2472c983d68eb76d8affee0de73 (face-color-supported-p): Return nil if no window system. diff -r 0f665b0b653f -r eb141cf52779 lisp/faces.el --- a/lisp/faces.el Mon Nov 20 23:11:39 1995 +0000 +++ b/lisp/faces.el Mon Nov 20 23:15:55 1995 +0000 @@ -1176,15 +1176,16 @@ ;; 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.