From: Juanma Barranquero Date: Wed, 7 Feb 2007 14:36:35 +0000 (+0000) Subject: (frame-set-background-mode): Use `color-values' and `display-color-p', X-Git-Tag: emacs-pretest-22.0.94~362 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ff52c940f64dfba189e2697473c954926b9ec9ef;p=emacs.git (frame-set-background-mode): Use `color-values' and `display-color-p', not `x-color-values' and `x-display-color-p'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 35427288759..fd6a28527e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,9 @@ 2007-02-07 Juanma Barranquero - * faces.el (face-valid-attribute-values): Use `defined-colors', - not its semi-obsolete alias `x-defined-colors'. + * faces.el (frame-set-background-mode): Use `color-values' and + `display-color-p', not `x-color-values' and `x-display-color-p'. + (face-valid-attribute-values): Use `defined-colors' instead of + `x-defined-colors'. 2007-02-07 Vinicius Jose Latorre diff --git a/lisp/faces.el b/lisp/faces.el index 3bde81e5456..749754ffb08 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1617,17 +1617,17 @@ according to the `background-mode' and `display-type' frame parameters." (or default-frame-background-mode 'dark)) ((equal bg-color "unspecified-fg") ; inverted colors (if (eq default-frame-background-mode 'light) 'dark 'light)) - ((>= (apply '+ (x-color-values bg-color frame)) + ((>= (apply '+ (color-values bg-color frame)) ;; Just looking at the screen, colors whose ;; values add up to .6 of the white total ;; still look dark to me. - (* (apply '+ (x-color-values "white" frame)) .6)) + (* (apply '+ (color-values "white" frame)) .6)) 'light) (t 'dark))) (display-type (cond ((null window-system) (if (tty-display-color-p frame) 'color 'mono)) - ((x-display-color-p frame) + ((display-color-p frame) 'color) ((x-display-grayscale-p frame) 'grayscale)