From: Bill Wohler Date: Tue, 3 Jan 2006 18:25:26 +0000 (+0000) Subject: * mh-customize.el (mh-folder-msg-number): Snow is actually off-white X-Git-Tag: emacs-pretest-22.0.90~4912 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=355ebcbf2599f2966069a99e25ce891e65cae3b7;p=emacs.git * 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. --- diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index e021e74f261..4116fb4223c 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,5 +1,15 @@ 2006-01-03 Bill Wohler + * 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. diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index a2b667769bf..f4cde0b186f 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el @@ -2536,10 +2536,14 @@ sequence." :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) @@ -2876,7 +2880,9 @@ The background and foreground are used in the image." '((((class color) (background light)) (:foreground "snow4")) (((class color) (background dark)) - (:foreground "snow3"))))) + (:foreground "snow3")) + (((class color)) + (:foreground "cyan"))))) ;; Local Variables: diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el index ba78c269439..0e19da4fa7d 100644 --- a/lisp/mh-e/mh-init.el +++ b/lisp/mh-e/mh-init.el @@ -336,23 +336,28 @@ there. Otherwise, the images directory is added to the "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)