[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New custom faces for rmail.el
From: |
Bastien Guerry |
Subject: |
Re: New custom faces for rmail.el |
Date: |
Tue, 12 Feb 2008 07:26:27 +0000 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) |
Miles Bader <address@hidden> writes:
> Bastien Guerry <address@hidden> writes:
>> But AFAICS there are many places where we have both mistakes: 1) have a
>> face *and* a variable, and 2) name them with the *-face suffix.
>
> font-lock-* is a special case (for historical, not sanity) reasons.
>
> Maybe it too should be changed, but that's a separate issue.
Okay then.
The patch below gets rid of `rmail-highlight-face' and use a single
`rmail-header-name' face.
--- rmail.el.~1.450.~ 2008-02-10 21:13:03.000000000 +0000
+++ rmail.el 2008-02-12 07:20:48.000000000 +0000
@@ -327,8 +327,7 @@
;;;###autoload
(defcustom rmail-highlighted-headers "^From:\\|^Subject:" "\
*Regexp to match Header fields that Rmail should normally highlight.
-A value of nil means don't highlight.
-See also `rmail-highlight-face'."
+A value of nil means don't highlight."
:type 'regexp
:group 'rmail-headers)
@@ -338,12 +337,11 @@
:group 'rmail-headers
:version "22.1")
-;;;###autoload
-(defcustom rmail-highlight-face 'rmail-highlight "\
-*Face used by Rmail for highlighting headers."
- :type '(choice (const :tag "Default" nil)
- face)
- :group 'rmail-headers)
+(defface rmail-header-name
+ '((t (:inherit font-lock-function-name-face)))
+ "Face to use for highlighting the header names."
+ :group 'rmail-headers
+ :version "23.1")
;;;###autoload
(defcustom rmail-delete-after-output nil "\
@@ -705,12 +703,12 @@
(cite-prefix "a-z")
(cite-suffix (concat cite-prefix "address@hidden'\"")))
(list '("^\\(From\\|Sender\\|Resent-From\\):"
- . font-lock-function-name-face)
- '("^Reply-To:.*$" . font-lock-function-name-face)
- '("^Subject:" . font-lock-comment-face)
- '("^X-Spam-Status:" . font-lock-keyword-face)
+ . 'rmail-header-name)
+ '("^Reply-To:.*$" . 'rmail-header-name)
+ '("^Subject:" . 'rmail-header-name)
+ '("^X-Spam-Status:" . 'rmail-header-name)
'("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):"
- . font-lock-keyword-face)
+ . 'rmail-header-name)
;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
`(,cite-chars
(,(concat "\\=[ \t]*"
@@ -721,7 +719,7 @@
(1 font-lock-comment-delimiter-face nil t)
(5 font-lock-comment-face nil t)))
'("^\\(X-[a-z0-9-]+\\|In-reply-to\\|Date\\):.*\\(\n[ \t]+.*\\)*$"
- . font-lock-string-face))))
+ . 'rmail-header-name))))
"Additional expressions to highlight in Rmail mode.")
;; Perform BODY in the summary buffer
@@ -2975,7 +2973,7 @@
(inhibit-read-only t)
;; Highlight with boldface if that is available.
;; Otherwise use the `highlight' face.
- (face (or rmail-highlight-face
+ (face (or 'rmail-highlight
(if (face-differs-from-default-p 'bold)
'bold 'highlight)))
;; List of overlays to reuse.
--
Bastien
- New custom faces for rmail.el, Bastien Guerry, 2008/02/11
- Re: New custom faces for rmail.el, Richard Stallman, 2008/02/11
- Re: New custom faces for rmail.el, Bastien, 2008/02/11
- Re: New custom faces for rmail.el, Glenn Morris, 2008/02/12
- Re: New custom faces for rmail.el, Bastien Guerry, 2008/02/12
- Re: New custom faces for rmail.el, Miles Bader, 2008/02/12
- Re: New custom faces for rmail.el,
Bastien Guerry <=
- Re: New custom faces for rmail.el, Xavier Maillard, 2008/02/12
- Re: New custom faces for rmail.el, Andreas Schwab, 2008/02/13
- Re: New custom faces for rmail.el, Xavier Maillard, 2008/02/13
- OT: A non-text attachment was scrubbed... (was: New custom faces for rmail.el), Reiner Steib, 2008/02/13
- Re: New custom faces for rmail.el, Bastien Guerry, 2008/02/13
- Re: New custom faces for rmail.el, Stefan Monnier, 2008/02/12
- Re: New custom faces for rmail.el, Bastien Guerry, 2008/02/12