# HG changeset patch # User Eli Zaretskii # Date 946822329 0 # Node ID 52e469fb402ad23a46bc8d343f15a0e9ac0ef531 # Parent 5d4d3f1ba0ccb37573c079272d493cabdd5e2026 (read-face-attribute, defined-colors, color-defined-p): Pass the frame to tty-color-* functions. (display-color-p, frame-set-background-mode): Pass the frame to tty-display-color-p. diff -r 5d4d3f1ba0cc -r 52e469fb402a lisp/faces.el --- a/lisp/faces.el Sun Jan 02 14:11:02 2000 +0000 +++ b/lisp/faces.el Sun Jan 02 14:12:09 2000 +0000 @@ -867,7 +867,7 @@ (not (memq window-system '(x w32 mac))) (not (memq new-value '(unspecified unspecified-fg unspecified-bg)))) - (setq new-value (car (tty-color-desc new-value)))) + (setq new-value (car (tty-color-desc new-value frame)))) (unless (eq new-value 'unspecified) (setq new-value (cdr (assoc new-value valid))))) ((eq valid 'integerp) @@ -1162,7 +1162,7 @@ If FRAME doesn't support colors, the value is nil." (if (memq (framep (or frame (selected-frame))) '(x w32)) (xw-defined-colors frame) - (mapcar 'car tty-color-alist))) + (mapcar 'car (tty-color-alist frame)))) (defalias 'x-defined-colors 'defined-colors) (defun color-defined-p (color &optional frame) @@ -1174,7 +1174,7 @@ nil (if (memq (framep (or frame (selected-frame))) '(x w32)) (xw-color-defined-p color frame) - (numberp (tty-color-translate color))))) + (numberp (tty-color-translate color frame))))) (defalias 'x-color-defined-p 'color-defined-p) (defun color-values (color &optional frame) @@ -1202,7 +1202,7 @@ nil (if (memq (framep (or display (selected-frame))) '(x w32)) (xw-display-color-p display) - (tty-display-color-p)))) + (tty-display-color-p display)))) (defalias 'x-display-color-p 'display-color-p) @@ -1248,7 +1248,7 @@ 'dark) (t 'light))) (display-type (cond ((null window-system) - (if (tty-display-color-p) 'color 'mono)) + (if (tty-display-color-p frame) 'color 'mono)) ((x-display-color-p frame) 'color) ((x-display-grayscale-p frame)