aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2007-02-07 14:36:35 +0000
committerJuanma Barranquero2007-02-07 14:36:35 +0000
commitff52c940f64dfba189e2697473c954926b9ec9ef (patch)
tree0262ca23bf5d90b37dbc273760b25c3359fe597e
parent9479c0abad64d3fcb7ac358e599b4ffbc4ad1d49 (diff)
downloademacs-ff52c940f64dfba189e2697473c954926b9ec9ef.tar.gz
emacs-ff52c940f64dfba189e2697473c954926b9ec9ef.zip
(frame-set-background-mode): Use `color-values' and `display-color-p',
not `x-color-values' and `x-display-color-p'.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/faces.el6
2 files changed, 7 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 35427288759..fd6a28527e8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,9 @@
12007-02-07 Juanma Barranquero <lekktu@gmail.com> 12007-02-07 Juanma Barranquero <lekktu@gmail.com>
2 2
3 * faces.el (face-valid-attribute-values): Use `defined-colors', 3 * faces.el (frame-set-background-mode): Use `color-values' and
4 not its semi-obsolete alias `x-defined-colors'. 4 `display-color-p', not `x-color-values' and `x-display-color-p'.
5 (face-valid-attribute-values): Use `defined-colors' instead of
6 `x-defined-colors'.
5 7
62007-02-07 Vinicius Jose Latorre <viniciusjl@ig.com.br> 82007-02-07 Vinicius Jose Latorre <viniciusjl@ig.com.br>
7 9
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."
1617 (or default-frame-background-mode 'dark)) 1617 (or default-frame-background-mode 'dark))
1618 ((equal bg-color "unspecified-fg") ; inverted colors 1618 ((equal bg-color "unspecified-fg") ; inverted colors
1619 (if (eq default-frame-background-mode 'light) 'dark 'light)) 1619 (if (eq default-frame-background-mode 'light) 'dark 'light))
1620 ((>= (apply '+ (x-color-values bg-color frame)) 1620 ((>= (apply '+ (color-values bg-color frame))
1621 ;; Just looking at the screen, colors whose 1621 ;; Just looking at the screen, colors whose
1622 ;; values add up to .6 of the white total 1622 ;; values add up to .6 of the white total
1623 ;; still look dark to me. 1623 ;; still look dark to me.
1624 (* (apply '+ (x-color-values "white" frame)) .6)) 1624 (* (apply '+ (color-values "white" frame)) .6))
1625 'light) 1625 'light)
1626 (t 'dark))) 1626 (t 'dark)))
1627 (display-type 1627 (display-type
1628 (cond ((null window-system) 1628 (cond ((null window-system)
1629 (if (tty-display-color-p frame) 'color 'mono)) 1629 (if (tty-display-color-p frame) 'color 'mono))
1630 ((x-display-color-p frame) 1630 ((display-color-p frame)
1631 'color) 1631 'color)
1632 ((x-display-grayscale-p frame) 1632 ((x-display-grayscale-p frame)
1633 'grayscale) 1633 'grayscale)