2006-01-03 Bill Wohler <wohler@newt.com>
+ * mh-customize.el (mh-folder-msg-number): Snow is actually
+ off-white on low color displays which turns to white when bold.
+ This is unreadable on white backgrounds. Use snow with min-colors
+ requirement. Use cyan on low-color displays.
+
+ * mh-init.el (mh-defface-compat): On low-color displays, delete
+ the high-color display rather than simply strip the min-colors
+ requirement since the existing algorithm shadowed the desired
+ display on low-color displays.
+
* mh-alias.el (mh-alias-add-alias): Remove leading * from
docstring.
:group 'mh-folder)
(defface mh-folder-msg-number
- '((((class color) (background light))
- (:foreground "snow4"))
- (((class color) (background dark))
- (:foreground "snow3")))
+ (mh-defface-compat
+ '((((class color) (min-colors 88) (background light))
+ (:foreground "snow4"))
+ (((class color) (min-colors 88) (background dark))
+ (:foreground "snow3"))
+ (((class color))
+ (:foreground "cyan"))))
+
"Message number face."
:group 'mh-faces
:group 'mh-folder)
'((((class color) (background light))
(:foreground "snow4"))
(((class color) (background dark))
- (:foreground "snow3")))))
+ (:foreground "snow3"))
+ (((class color))
+ (:foreground "cyan")))))
;; Local Variables:
"Convert SPEC for defface if necessary to run on older platforms.
Modifies SPEC in place and returns it. See `defface' for the spec definition.
-When `mh-min-colors-defined-flag' is nil, this function finds a
-display with a single \"class\" requirement with a \"color\"
-item, renames the requirement to \"tty\" and moves it to the
-beginning of the list. It then strips any \"min-colors\"
-requirements."
- (when (not mh-min-colors-defined-flag)
- ;; Insert ((class tty)) display with ((class color)) attributes.
- (let ((attributes (cdr (assoc '((class color)) spec))))
- (cons (cons '((class tty)) attributes) spec))
- ;; Delete ((class color)) display.
- (delq (assoc '((class color)) spec) spec)
- ;; Strip min-colors.
- (loop for entry in spec do
- (when (not (eq (car entry) t))
- (if (assoc 'min-colors (car entry))
- (delq (assoc 'min-colors (car entry)) (car entry))))))
- spec)
+When `mh-min-colors-defined-flag' is nil, this function finds
+display entries with \"min-colors\" requirements and either
+removes the \"min-colors\" requirement or strips the display
+entirely if the display does not support the number of specified
+colors."
+ (if mh-min-colors-defined-flag
+ spec
+ (let ((cells (display-color-cells))
+ new-spec)
+ ;; Remove entries with min-colors, or delete them if we have fewer colors
+ ;; than they specify.
+ (loop for entry in (reverse spec) do
+ (let ((requirement (if (eq (car entry) t)
+ nil
+ (assoc 'min-colors (car entry)))))
+ (if requirement
+ (when (>= cells (nth 1 requirement))
+ (setq new-spec (cons (cons (delq requirement (car entry))
+ (cdr entry))
+ new-spec)))
+ (setq new-spec (cons entry new-spec)))))
+ new-spec)))
(provide 'mh-init)