Mercurial > hg > xemacs-beta
diff lisp/faces.el @ 5378:4f0a1f4cc111
Improve support for min-colors req in `defface'.
lisp/faces.el (face-spec-set-match-display):
Protect against `display-color-cells' returning nil.
Delete unreferenced let-binding of `min-colors'.
man/lispref/customize.texi (Face Definitions): New node.
(Customization): Add entry to menu.
(Variable Definitions): Add cross-ref for `defface'.
(Customization Types): Fixup Previous link.
man/lispref/faces.texi (Faces):
Clarify that built-in properties of faces are computed at runtime.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Sat, 19 Mar 2011 22:13:14 +0900 |
parents | b6e59ea11533 |
children | 4dee0387b9de |
line wrap: on
line diff
--- a/lisp/faces.el Thu Mar 17 21:50:34 2011 +0000 +++ b/lisp/faces.el Sat Mar 19 22:13:14 2011 +0900 @@ -1702,7 +1702,6 @@ (type (plist-get props 'type)) (class (plist-get props 'class)) (background (plist-get props 'background)) - (min-colors (plist-get props 'min-colors)) (match t) (entries display) entry req options) @@ -1715,7 +1714,9 @@ (type (memq type options)) (class (memq class options)) (background (memq background options)) - (min-colors (>= (display-color-cells frame) + ;; `display-color-cells' can return nil (eg, TTYs). + ;; If so, assume monochrome. + (min-colors (>= (or (display-color-cells frame) 2) (car options))) (t (warn "Unknown req `%S' with options `%S'" req options)