Commit d49ed7d4 authored by Bill Wohler's avatar Bill Wohler
Browse files

* mh-customize.el: Sync docstrings with manual for faces and sort them

alphabetically.
(mh-faces): Move below mh-hooks. (mh-folder-faces, mh-index-faces,
mh-letter-faces)
(mh-show-faces, mh-speed-faces): Delete. Organize faces like hooks.
(mh-speed-update-interval): Fix group (mh-speedbar, not mh-speed).
(facemenu-unlisted-faces): Might as well ignore all MH-E faces.
(mh-folder-body-face, mh-folder-cur-msg-face)
(mh-folder-cur-msg-number-face, mh-folder-date-face)
(mh-folder-followup-face, mh-folder-msg-number-face)
(mh-folder-deleted-face, mh-folder-refiled-face)
(mh-folder-subject-face, mh-folder-address-face)
(mh-folder-scan-format-face, mh-folder-to-face) (mh-index-folder-face,
mh-show-cc-face, mh-show-date-face) (mh-show-header-face,
mh-show-pgg-good-face) (mh-show-pgg-unknown-face,
mh-show-pgg-bad-face)
(mh-show-to-face, mh-show-from-face, mh-show-subject-face): Delete.
(mh-folder-cur-msg): Unused. Delete.
(mh-folder-address): Use defface; inherit from mh-folder-subject.
(mh-folder-body, mh-folder-cur-msg-number, mh-folder-date): Inherit
from mh-folder-msg-number.
(mh-folder-deleted): Use defface. Inherit from mh-folder-msg-number.
(mh-folder-sent-to-me-hint): New face. Inherit from mh-folder-date.
(mh-folder-sent-to-me-sender): Rename from mh-folder-scan-format. Use
defface. Inherit from mh-folder-followup.
(mh-show-xface): Inherit from mh-show-from and highlight.
(bw-face-generation, bw-toggle-faces)
(bw-new-face-to-old, bw-old-face-to-new): New (tempoarary) variables,
functions for toggling between old and new faces.

* mh-e.el (font-lock-auto-fontify, font-lock-defaults): Hide in
eval-when-compile. We should probably do this throughout.
(mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp)
(mh-scan-refiled-msg-regexp, mh-scan-cur-msg-number-regexp)
(mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp)
(mh-scan-subject-regexp): Sync docstrings with manual
(mh-scan-format-regexp): Rename to mh-scan-sent-to-me-sender-regexp.
Drop date parenthesized expression. Make expression more like the
others (anchored at the beginning of line). Sync docstrings with
manual.
(mh-folder-font-lock-keywords): Use faces directly rather than -face
variables. Use mh-scan-sent-to-me-sender-regexp instead of
mh-scan-format-regexp, and within that expression, use faces
mh-folder-sent-to-me-hint and mh-folder-sent-to-me-sender instead of
mh-folder-date-face and mh-folder-scan-format-face which were
misleading.

* mh-mime.el (mh-mime-security-button-face): Use faces directly rather
than -face variables.

* mh-utils.el (mh-show-font-lock-keywords): Use faces directly rather
than -face variables.
(mh-face-foreground-compat, mh-face-background-compat): New macros.
(mh-face-display-function): Use mh-face-foreground-compat and
mh-face-background-compat to use inherited attributes of mh-show-xface
on Emacs 22 while still working on Emacs 21.
parent bb951f0e
2006-01-01 Bill Wohler <wohler@newt.com>
* mh-customize.el: Sync docstrings with manual for faces and sort
them alphabetically.
(mh-faces): Move below mh-hooks.
(mh-folder-faces, mh-index-faces, mh-letter-faces)
(mh-show-faces, mh-speed-faces): Delete. Organize faces like
hooks.
(mh-speed-update-interval): Fix group (mh-speedbar, not mh-speed).
(facemenu-unlisted-faces): Might as well ignore all MH-E faces.
(mh-folder-body-face, mh-folder-cur-msg-face)
(mh-folder-cur-msg-number-face, mh-folder-date-face)
(mh-folder-followup-face, mh-folder-msg-number-face)
(mh-folder-deleted-face, mh-folder-refiled-face)
(mh-folder-subject-face, mh-folder-address-face)
(mh-folder-scan-format-face, mh-folder-to-face)
(mh-index-folder-face, mh-show-cc-face, mh-show-date-face)
(mh-show-header-face, mh-show-pgg-good-face)
(mh-show-pgg-unknown-face, mh-show-pgg-bad-face)
(mh-show-to-face, mh-show-from-face, mh-show-subject-face):
Delete.
(mh-folder-cur-msg): Unused. Delete.
(mh-folder-address): Use defface; inherit from mh-folder-subject.
(mh-folder-body, mh-folder-cur-msg-number, mh-folder-date):
Inherit from mh-folder-msg-number.
(mh-folder-deleted): Use defface. Inherit from
mh-folder-msg-number.
(mh-folder-sent-to-me-hint): New face. Inherit from
mh-folder-date.
(mh-folder-sent-to-me-sender): Rename from mh-folder-scan-format.
Use defface. Inherit from mh-folder-followup.
(mh-show-xface): Inherit from mh-show-from and highlight.
(bw-face-generation, bw-toggle-faces)
(bw-new-face-to-old, bw-old-face-to-new): New (tempoarary)
variables, functions for toggling between old and new faces.
* mh-e.el (font-lock-auto-fontify, font-lock-defaults): Hide in
eval-when-compile. We should probably do this throughout.
(mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp)
(mh-scan-refiled-msg-regexp, mh-scan-cur-msg-number-regexp)
(mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp)
(mh-scan-subject-regexp): Sync docstrings with manual
(mh-scan-format-regexp): Rename to
mh-scan-sent-to-me-sender-regexp. Drop date parenthesized
expression. Make expression more like the others (anchored at the
beginning of line). Sync docstrings with manual.
(mh-folder-font-lock-keywords): Use faces directly rather than
-face variables. Use mh-scan-sent-to-me-sender-regexp instead of
mh-scan-format-regexp, and within that expression, use faces
mh-folder-sent-to-me-hint and mh-folder-sent-to-me-sender instead
of mh-folder-date-face and mh-folder-scan-format-face which were
misleading.
* mh-mime.el (mh-mime-security-button-face): Use faces directly
rather than -face variables.
* mh-utils.el (mh-show-font-lock-keywords): Use faces directly
rather than -face variables.
(mh-face-foreground-compat, mh-face-background-compat): New macros.
(mh-face-display-function): Use mh-face-foreground-compat and
mh-face-background-compat to use inherited attributes of
mh-show-xface on Emacs 22 while still working on Emacs 21.
2005-12-28 Bill Wohler <wohler@newt.com>
* mh-comp.el (mh-e-user-agent): Move here from simple.el. Use
......
......@@ -204,57 +204,18 @@ and GNU mailutils."
:prefix "mh-"
:group 'mh-e)
(defgroup mh-faces nil
"Faces used in MH-E."
:link '(custom-manual "(mh-e)Top")
:prefix "mh-"
:group 'faces
:group 'mh-e)
(defgroup mh-hooks nil
"MH-E hooks."
:link '(custom-manual "(mh-e)Top")
:prefix "mh-"
:group 'mh-e)
;;; Faces
(defgroup mh-folder-faces nil
"Faces used in scan listing."
:link '(custom-manual "(mh-e)Folders")
:prefix "mh-"
:group 'mh-faces
:group 'mh-folder)
(defgroup mh-index-faces nil
"Faces used in searching."
:link '(custom-manual "(mh-e)Searching")
:prefix "mh-"
:group 'mh-faces
:group 'mh-index)
(defgroup mh-letter-faces nil
"Faces used in message drafts."
:link '(custom-manual "(mh-e)Editing Drafts")
:prefix "mh-"
:group 'mh-faces
:group 'mh-letter)
(defgroup mh-show-faces nil
"Faces used in message display."
:link '(custom-manual "(mh-e)Reading Mail")
:prefix "mh-"
:group 'mh-faces
:group 'mh-show)
(defgroup mh-speed-faces nil
"Faces used in speedbar."
:link '(custom-manual "(mh-e)Speedbar")
(defgroup mh-faces nil
"Faces used in MH-E."
:link '(custom-manual "(mh-e)Top")
:prefix "mh-"
:group 'mh-faces
:group 'mh-speed)
:group 'faces
:group 'mh-e)
......@@ -1883,13 +1844,13 @@ lines you'd like to see."
;;; The Speedbar (:group 'mh-speed)
;;; The Speedbar (:group 'mh-speedbar)
(defcustom mh-speed-update-interval 60
"Time between speedbar updates in seconds.
Set to 0 to disable automatic update."
:type 'integer
:group 'mh-speed)
:group 'mh-speedbar)
......@@ -2526,81 +2487,42 @@ sequence."
;;; Faces (:group 'mh-*-faces + group where faces described)
;;; Faces (:group 'mh-faces + group where faces described)
(if (boundp 'facemenu-unlisted-faces)
(add-to-list 'facemenu-unlisted-faces "^mh-"))
;;; Faces Used in Scan Listing (:group 'mh-folder-faces)
(defface mh-folder-address '((t (:inherit mh-folder-subject)))
"Recipient face."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-folder-body-face 'mh-folder-body
"Face used to highlight body text in MH-Folder buffers.")
(defface mh-folder-body
(mh-defface-compat
'((((class color) (min-colors 88) (background light))
(:foreground "RosyBrown"))
(((class color) (min-colors 88) (background dark))
(:foreground "LightSalmon"))
(((class color))
(:foreground "green"))
(((class grayscale) (background light))
(:foreground "DimGray" :italic t))
(((class grayscale) (background dark))
(:foreground "LightGray" :italic t))
(t
(:italic t))))
"Face used to highlight body text in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-cur-msg-face 'mh-folder-cur-msg
"Face used for the current message line in MH-Folder buffers.")
(defface mh-folder-cur-msg
(mh-defface-compat
'((((class color) (min-colors 88) (background light))
(:background "LightGreen") ;Use this for solid background colour
;; (:underline t) ;Use this for underlining
)
(((class color) (min-colors 88) (background dark))
(:background "DarkOliveGreen4"))
(((class color))
(:background "LightGreen"))
(t
(:underline t))))
"Face used for the current message line in MH-Folder buffers."
:group 'mh-folder-faces)
'((((class color))
(:inherit mh-folder-msg-number))
(t
(:inherit mh-folder-msg-number :italic t)))
"Body text face."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number
"Face used to highlight the current message in MH-Folder buffers.")
(defface mh-folder-cur-msg-number
(mh-defface-compat
'((((class color) (min-colors 88) (background light))
(:foreground "Purple"))
(((class color) (min-colors 88) (background dark))
(:foreground "Cyan"))
(((class color))
(:foreground "cyan" :weight bold))
(((class grayscale) (background light))
(:foreground "LightGray" :bold t))
(((class grayscale) (background dark))
(:foreground "DimGray" :bold t))
(t
(:bold t))))
"Face used to highlight the current message in MH-Folder buffers."
:group 'mh-folder-faces)
'((t
(:inherit mh-folder-msg-number :bold t)))
"Current message number face."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-folder-date-face 'mh-folder-date
"Face used to highlight the date in MH-Folder buffers.")
(defface mh-folder-date
'((((class color) (background light))
(:foreground "snow4"))
(((class color) (background dark))
(:foreground "snow3"))
(t
(:bold t)))
"Face used to highlight the date in MH-Folder buffers."
:group 'mh-folder-faces)
(defface mh-folder-date '((t (:inherit mh-folder-msg-number)))
"Date face."
:group 'mh-faces
:group 'mh-folder)
(defface mh-folder-deleted '((t (:inherit mh-folder-msg-number)))
"Deleted message face."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-folder-followup-face 'mh-folder-followup
"Face used to highlight Re: subject text in MH-Folder buffers.")
(defface mh-folder-followup
'((((class color) (background light))
(:foreground "blue3"))
......@@ -2608,27 +2530,19 @@ sequence."
(:foreground "LightGoldenRod"))
(t
(:bold t)))
"Face used to highlight Re: subject text in MH-Folder buffers."
:group 'mh-folder-faces)
"\"Re:\" face."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-folder-msg-number-face 'mh-folder-msg-number
"Face used to highlight the message number in MH-Folder buffers.")
(defface mh-folder-msg-number
'((((class color) (background light))
(:foreground "snow4"))
(((class color) (background dark))
(:foreground "snow3"))
(t
(:bold t)))
"Face used to highlight the message number in MH-Folder buffers."
:group 'mh-folder-faces)
(defvar mh-folder-deleted-face 'mh-folder-deleted
"Face used to highlight deleted messages in MH-Folder buffers.")
(copy-face 'mh-folder-msg-number 'mh-folder-deleted)
(:foreground "snow3")))
"Message number face."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-folder-refiled-face 'mh-folder-refiled
"Face used to highlight refiled messages in MH-Folder buffers.")
(defface mh-folder-refiled
(mh-defface-compat
'((((class color) (min-colors 88) (background light))
......@@ -2643,13 +2557,26 @@ sequence."
(:foreground "DimGray" :bold t :italic t))
(t
(:bold t :italic t))))
"Face used to highlight refiled messages in MH-Folder buffers."
:group 'mh-folder-faces)
"Refiled message face."
:group 'mh-faces
:group 'mh-folder)
(defface mh-folder-sent-to-me-hint '((t (:inherit mh-folder-date)))
"Fontification hint face in messages sent directly to us.
The detection of messages sent to us is governed by the scan
format `mh-scan-format-nmh' and the regular expression
`mh-scan-sent-to-me-sender-regexp'."
:group 'mh-faces
:group 'mh-folder)
(defface mh-folder-sent-to-me-sender '((t (:inherit mh-folder-followup)))
"Sender face in messages sent directly to us.
The detection of messages sent to us is governed by the scan
format `mh-scan-format-nmh' and the regular expression
`mh-scan-sent-to-me-sender-regexp'."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-folder-subject-face 'mh-folder-subject
"Face used to highlight subject text in MH-Folder buffers.")
(if (boundp 'facemenu-unlisted-faces)
(add-to-list 'facemenu-unlisted-faces "^mh-folder"))
(defface mh-folder-subject
'((((class color) (background light))
(:foreground "blue4"))
......@@ -2657,8 +2584,9 @@ sequence."
(:foreground "yellow"))
(t
(:bold t)))
"Face used to highlight subject text in MH-Folder buffers."
:group 'mh-folder-faces)
"Subject face."
:group 'mh-faces
:group 'mh-folder)
(defface mh-folder-tick
'((((class color) (background dark))
......@@ -2667,19 +2595,10 @@ sequence."
(:background "#dddf7e"))
(t
(:underline t)))
"Face used to show ticked messages."
:group 'mh-folder-faces)
(defvar mh-folder-address-face 'mh-folder-address
"Face used to highlight the address in MH-Folder buffers.")
(copy-face 'mh-folder-subject 'mh-folder-address)
(defvar mh-folder-scan-format-face 'mh-folder-scan-format
"Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.")
(copy-face 'mh-folder-followup 'mh-folder-scan-format)
"Ticked message face."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-folder-to-face 'mh-folder-to
"Face used to highlight the To: string in MH-Folder buffers.")
(defface mh-folder-to
(mh-defface-compat
'((((class color) (min-colors 88) (background light))
......@@ -2694,15 +2613,10 @@ sequence."
(:foreground "LightGray" :italic t))
(t
(:italic t))))
"Face used to highlight the To: string in MH-Folder buffers."
:group 'mh-folder-faces)
;;; Faces Used in Searching (:group 'mh-index-faces)
"\"To:\" face."
:group 'mh-faces
:group 'mh-folder)
(defvar mh-index-folder-face 'mh-index-folder
"Face used to highlight folders in MH-Index buffers.")
(defface mh-index-folder
'((((class color) (background light))
(:foreground "dark green" :bold t))
......@@ -2710,12 +2624,9 @@ sequence."
(:foreground "indian red" :bold t))
(t
(:bold t)))
"Face used to highlight folders in MH-Index buffers."
:group 'mh-index-faces)
;;; Faces Used in Message Drafts (:group 'mh-letter-faces)
"Folder heading face in MH-Folder buffers created by searches."
:group 'mh-faces
:group 'mh-index)
(defface mh-letter-header-field
'((((class color) (background light))
......@@ -2724,15 +2635,10 @@ sequence."
(:background "gray10"))
(t
(:bold t)))
"Face used to display header fields in draft buffers."
:group 'mh-letter-faces)
;;; Faces Used in Message Display (:group 'mh-show-faces)
"Editable header field value face in draft buffers."
:group 'mh-faces
:group 'mh-letter)
(defvar mh-show-cc-face 'mh-show-cc
"Face used to highlight cc: header fields.")
(defface mh-show-cc
(mh-defface-compat
'((((class color) (min-colors 88) (background light))
......@@ -2747,11 +2653,10 @@ sequence."
(:foreground "DimGray" :bold t :italic t))
(t
(:bold t :italic t))))
"Face used to highlight cc: header fields."
:group 'mh-show-faces)
"Face used to highlight \"cc:\" header fields."
:group 'mh-faces
:group 'mh-show)
(defvar mh-show-date-face 'mh-show-date
"Face used to highlight the Date: header field.")
(defface mh-show-date
(mh-defface-compat
'((((class color) (min-colors 88) (background light))
......@@ -2766,11 +2671,21 @@ sequence."
(:foreground "DimGray" :bold t))
(t
(:bold t :underline t))))
"Face used to highlight the Date: header field."
:group 'mh-show-faces)
"Face used to highlight \"Date:\" header fields."
:group 'mh-faces
:group 'mh-show)
(defface mh-show-from
'((((class color) (background light))
(:foreground "red3"))
(((class color) (background dark))
(:foreground "cyan"))
(t
(:bold t)))
"Face used to highlight \"From:\" header fields."
:group 'mh-faces
:group 'mh-show)
(defvar mh-show-header-face 'mh-show-header
"Face used to deemphasize unspecified header fields.")
(defface mh-show-header
(mh-defface-compat
'((((class color) (min-colors 88) (background light))
......@@ -2785,46 +2700,35 @@ sequence."
(:foreground "LightGray" :italic t))
(t
(:italic t))))
"Face used to deemphasize unspecified header fields."
:group 'mh-show-faces)
"Face used to deemphasize less interesting header fields."
:group 'mh-faces
:group 'mh-show)
(defvar mh-show-pgg-good-face 'mh-show-pgg-good
"Face used to highlight a good PGG signature.")
(defface mh-show-pgg-good
'((t
(:bold t :foreground "LimeGreen")))
"Face used to highlight a good PGG signature."
:group 'mh-show-faces)
(defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown
"Face used to highlight a PGG signature whose status is unknown.
This face is also used for a signature when the signer is
untrusted.")
(defface mh-show-pgg-unknown
'((t
(:bold t :foreground "DarkGoldenrod2")))
"Face used to highlight a PGG signature whose status is unknown.
This face is also used for a signature when the signer is untrusted."
:group 'mh-show-faces)
(defvar mh-show-pgg-bad-face 'mh-show-pgg-bad
"Face used to highlight a bad PGG signature.")
(defface mh-show-pgg-bad
'((t
(:bold t :foreground "DeepPink1")))
"Face used to highlight a bad PGG signature."
:group 'mh-show-faces)
(defface mh-show-pgg-bad '((t (:bold t :foreground "DeepPink1")))
"Bad PGG signature face."
:group 'mh-faces
:group 'mh-show)
(defface mh-show-signature
'((t
(:italic t)))
"Face used to highlight the message signature."
:group 'mh-show-faces)
(defface mh-show-pgg-good '((t (:bold t :foreground "LimeGreen")))
"Good PGG signature face."
:group 'mh-faces
:group 'mh-show)
(defface mh-show-pgg-unknown '((t (:bold t :foreground "DarkGoldenrod2")))
"Unknown or untrusted PGG signature face."
:group 'mh-faces
:group 'mh-show)
(defface mh-show-signature '((t (:italic t)))
"Signature face."
:group 'mh-faces
:group 'mh-show)
(defface mh-show-subject '((t (:inherit mh-folder-subject)))
"Face used to highlight \"Subject:\" header fields."
:group 'mh-faces
:group 'mh-show)
(defvar mh-show-to-face 'mh-show-to
"Face used to highlight the To: header field.")
(if (boundp 'facemenu-unlisted-faces)
(add-to-list 'facemenu-unlisted-faces "^mh-show"))
(defface mh-show-to
'((((class color) (background light))
(:foreground "SaddleBrown"))
......@@ -2835,43 +2739,31 @@ This face is also used for a signature when the signer is untrusted."
(((class grayscale) (background dark))
(:foreground "LightGray" :underline t))
(t (:underline t)))
"Face used to highlight the To: header field."
:group 'mh-show-faces)
(defvar mh-show-from-face 'mh-show-from
"Face used to highlight the From: header field.")
(defface mh-show-from
'((((class color) (background light))
(:foreground "red3"))
(((class color) (background dark))
(:foreground "cyan"))
(t
(:bold t)))
"Face used to highlight the From: header field."
:group 'mh-show-faces)
(defface mh-show-xface
'((t
(:foreground "black" :background "white")))
"Face used to display the X-Face image.
The background and foreground is used in the image."
:group 'mh-show-faces)
(defvar mh-show-subject-face 'mh-show-subject
"Face used to highlight the Subject: header field.")
(copy-face 'mh-folder-subject 'mh-show-subject)
"Face used to highlight \"To:\" header fields."
:group 'mh-faces
:group 'mh-show)
;;; Faces Used in Speedbar (:group 'mh-speed-faces)
(defface mh-show-xface '((t (:inherit (mh-show-from highlight))))
"X-Face image face.
The background and foreground are used in the image."
:group 'mh-faces
:group 'mh-show)
(defface mh-speedbar-folder
'((((class color) (background light))
(:foreground "blue4"))
(((class color) (background dark))
(:foreground "light blue")))
"Face used for folders in the speedbar buffer."
:group 'mh-speed-faces)
"Basic folder face."
:group 'mh-faces
:group 'mh-speedbar)
(defface mh-speedbar-folder-with-unseen-messages
'((t
(:inherit mh-speedbar-folder :bold t)))
"Folder face when folder contains unread messages."
:group 'mh-faces
:group 'mh-speedbar)
(defface mh-speedbar-selected-folder
'((((class color) (background light))
......@@ -2880,20 +2772,111 @@ The background and foreground is used in the image."
(:foreground "red1" :underline t))
(t
(:underline t)))
"Face used for the current folder."
:group 'mh-speed-faces)
(defface mh-speedbar-folder-with-unseen-messages
'((t
(:inherit mh-speedbar-folder :bold t)))
"Face used for folders in the speedbar buffer which have unread messages."
:group 'mh-speed-faces)
"Selected folder face."
:group 'mh-faces
:group 'mh-speedbar)
(defface mh-speedbar-selected-folder-with-unseen-messages
'((t
(:inherit mh-speedbar-selected-folder :bold t)))
"Face used for the current folder when it has unread messages."
:group 'mh-speed-faces)
"Selected folder face when folder contains unread messages."
:group 'mh-faces
:group 'mh-speedbar)
;;; XXX Temporary function for comparing old and new faces. Delete
;;; when everybody is happy.
(defvar bw-face-generation 'new)
(defun bw-toggle-faces ()
"Toggle between old and new faces."
(interactive)
(cond ((eq bw-face-generation 'new)
(message "Going from new to old...")
(bw-new-face-to-old)
(message "Going from new to old...done")
(setq bw-face-generation 'old))
((eq bw-face-generation 'old)
(message "Going from old to new...")
(bw-old-face-to-new)
(message "Going from old to new...done")
(setq bw-face-generation 'new))))
(defun bw-new-face-to-old ()