(frame-set-background-mode): Use `color-values' and `display-color-p',
authorJuanma Barranquero <lekktu@gmail.com>
Wed, 7 Feb 2007 14:36:35 +0000 (14:36 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Wed, 7 Feb 2007 14:36:35 +0000 (14:36 +0000)
not `x-color-values' and `x-display-color-p'.

lisp/ChangeLog
lisp/faces.el

index 3542728..fd6a285 100644 (file)
@@ -1,7 +1,9 @@
 2007-02-07  Juanma Barranquero  <lekktu@gmail.com>
 
-       * 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  <viniciusjl@ig.com.br>
 
index 3bde81e..749754f 100644 (file)
@@ -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)