diff options
| author | Richard M. Stallman | 1995-07-18 13:27:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-07-18 13:27:49 +0000 |
| commit | 82c028e0bc908bacf3cf23a8dfb09447464ef5b0 (patch) | |
| tree | b79cafdf37fc5219b40414be1750a1d0acb250c2 | |
| parent | 5f8c8f0056dff5812f62477ebc7b514d93663e24 (diff) | |
| download | emacs-82c028e0bc908bacf3cf23a8dfb09447464ef5b0.tar.gz emacs-82c028e0bc908bacf3cf23a8dfb09447464ef5b0.zip | |
(x-create-frame-with-faces):
Specify frame arg to x-color-values and frame-parameters.
(set-face-background): Pass background-p arg to face-color-supported-p.
| -rw-r--r-- | lisp/faces.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 637170cc457..04dc3c9a2fb 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -150,7 +150,7 @@ in that frame; otherwise change each frame." | |||
| 150 | ;; For a specific frame, use gray stipple instead of gray color | 150 | ;; For a specific frame, use gray stipple instead of gray color |
| 151 | ;; if the display does not support a gray color. | 151 | ;; if the display does not support a gray color. |
| 152 | (if (and frame (not (eq frame t)) | 152 | (if (and frame (not (eq frame t)) |
| 153 | (not (face-color-supported-p frame color))) | 153 | (not (face-color-supported-p frame color t))) |
| 154 | (set-face-stipple face face-default-stipple frame) | 154 | (set-face-stipple face face-default-stipple frame) |
| 155 | (if (null frame) | 155 | (if (null frame) |
| 156 | (let ((frames (frame-list))) | 156 | (let ((frames (frame-list))) |
| @@ -1065,13 +1065,14 @@ selected frame." | |||
| 1065 | ;; on this frame. | 1065 | ;; on this frame. |
| 1066 | (let ((bg-resource (x-get-resource ".backgroundMode" | 1066 | (let ((bg-resource (x-get-resource ".backgroundMode" |
| 1067 | "BackgroundMode")) | 1067 | "BackgroundMode")) |
| 1068 | (params (frame-parameters)) | 1068 | (params (frame-parameters frame)) |
| 1069 | (bg-mode)) | 1069 | (bg-mode)) |
| 1070 | (setq bg-mode | 1070 | (setq bg-mode |
| 1071 | (cond (bg-resource (intern (downcase bg-resource))) | 1071 | (cond (bg-resource (intern (downcase bg-resource))) |
| 1072 | ((< (apply '+ (x-color-values | 1072 | ((< (apply '+ (x-color-values |
| 1073 | (cdr (assq 'background-color params)))) | 1073 | (cdr (assq 'background-color params)) |
| 1074 | (/ (apply '+ (x-color-values "white")) 3)) | 1074 | frame)) |
| 1075 | (/ (apply '+ (x-color-values "white" frame)) 3)) | ||
| 1075 | 'dark) | 1076 | 'dark) |
| 1076 | (t 'light))) | 1077 | (t 'light))) |
| 1077 | (modify-frame-parameters frame | 1078 | (modify-frame-parameters frame |