# HG changeset patch # User Jeff Sparkes # Date 1300386902 14400 # Node ID b6e59ea1153332d27b02a738d3ebbe7dafe23fd1 # Parent 6c3a695f54f56c4456368dd5f97242e66efa6311 Add min-colors specifier to defface, and document it. diff -r 6c3a695f54f5 -r b6e59ea11533 lisp/ChangeLog --- a/lisp/ChangeLog Mon Mar 14 21:04:45 2011 +0000 +++ b/lisp/ChangeLog Thu Mar 17 14:35:02 2011 -0400 @@ -1,3 +1,10 @@ +2011-03-14 Jeff Sparkes + + * custom.el (defface): Document `min-colors' specifier. + + * faces.el (face-spec-set-match-display): Add `min-colors' + specifer for defface. + 2011-03-12 Aidan Kehoe * isearch-mode.el (isearch-mode-map): diff -r 6c3a695f54f5 -r b6e59ea11533 lisp/custom.el --- a/lisp/custom.el Mon Mar 14 21:04:45 2011 +0000 +++ b/lisp/custom.el Thu Mar 17 14:35:02 2011 -0400 @@ -325,6 +325,9 @@ `class' (the frame's color support) Should be one of `color', `grayscale', or `mono'. +`min-colors' (the minimum number of colors the frame supports) + Should be in integer which is compared to `display-color-cells' + `background' (what color is used for the background text) Should be one of `light' or `dark'. diff -r 6c3a695f54f5 -r b6e59ea11533 lisp/faces.el --- a/lisp/faces.el Mon Mar 14 21:04:45 2011 +0000 +++ b/lisp/faces.el Thu Mar 17 14:35:02 2011 -0400 @@ -1702,6 +1702,7 @@ (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) @@ -1714,6 +1715,8 @@ (type (memq type options)) (class (memq class options)) (background (memq background options)) + (min-colors (>= (display-color-cells frame) + (car options))) (t (warn "Unknown req `%S' with options `%S'" req options) nil)))) diff -r 6c3a695f54f5 -r b6e59ea11533 man/ChangeLog --- a/man/ChangeLog Mon Mar 14 21:04:45 2011 +0000 +++ b/man/ChangeLog Thu Mar 17 14:35:02 2011 -0400 @@ -1,3 +1,8 @@ +2011-03-14 Jeff Sparkes + + * lispref/faces.texi (Faces): Mention `min-colors' as a + face specifier. + 2011-03-01 Aidan Kehoe * lispref/commands.texi (Using Interactive): diff -r 6c3a695f54f5 -r b6e59ea11533 man/lispref/faces.texi --- a/man/lispref/faces.texi Mon Mar 14 21:04:45 2011 +0000 +++ b/man/lispref/faces.texi Thu Mar 17 14:35:02 2011 -0400 @@ -27,7 +27,8 @@ Each built-in property of a face is controlled using a specifier, which allows it to have separate values in particular buffers, frames, windows, and devices and to further vary according to device type -(X or TTY) and device class (color, mono, or grayscale). +(X or TTY), device class (color, mono, or grayscale) and number of +displayable colors (min-colors). @xref{Specifiers}, for more information. The face named @code{default} is used for ordinary text. The face named