aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/faces.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index e6e56f55647..675e2b54387 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -109,6 +109,10 @@ in that frame; otherwise change each frame."
109If the optional FRAME argument is provided, change only 109If the optional FRAME argument is provided, change only
110in that frame; otherwise change each frame." 110in that frame; otherwise change each frame."
111 (interactive (internal-face-interactive "background")) 111 (interactive (internal-face-interactive "background"))
112 (if (and frame (member color '("gray" "gray1" "gray3"))
113 (not (x-display-color-p frame))
114 (not (x-display-grayscale-p frame)))
115 (set-face-stipple face color frame))
112 (internal-set-face-1 face 'background color 5 frame)) 116 (internal-set-face-1 face 'background color 5 frame))
113 117
114(defsubst set-face-stipple (face name &optional frame) 118(defsubst set-face-stipple (face name &optional frame)
@@ -966,8 +970,9 @@ selected frame."
966;; That can't fail, so any subsequent elements after the t are ignored. 970;; That can't fail, so any subsequent elements after the t are ignored.
967(defun face-try-color-list (function face colors frame) 971(defun face-try-color-list (function face colors frame)
968 (if (stringp colors) 972 (if (stringp colors)
969 (if (or (and (not (x-display-color-p)) (not (string= colors "gray"))) 973 (if (and (not (member colors '("gray" "gray1" "gray3")))
970 (= (x-display-planes) 1)) 974 (or (not (x-display-color-p))
975 (= (x-display-planes) 1)))
971 nil 976 nil
972 (funcall function face colors frame)) 977 (funcall function face colors frame))
973 (if (eq colors t) 978 (if (eq colors t)
@@ -975,9 +980,9 @@ selected frame."
975 (let (done) 980 (let (done)
976 (while (and colors (not done)) 981 (while (and colors (not done))
977 (if (and (stringp (car colors)) 982 (if (and (stringp (car colors))
978 (or (and (not (x-display-color-p)) 983 (and (not (member (car colors) '("gray" "gray1" "gray3")))
979 (not (string= (car colors) "gray"))) 984 (or (not (x-display-color-p))
980 (= (x-display-planes) 1))) 985 (= (x-display-planes) 1))))
981 nil 986 nil
982 (if (cdr colors) 987 (if (cdr colors)
983 ;; If there are more colors to try, catch errors 988 ;; If there are more colors to try, catch errors