[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New custom faces for rmail.el
From: |
Bastien |
Subject: |
Re: New custom faces for rmail.el |
Date: |
Tue, 12 Feb 2008 04:15:34 +0000 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> You seem to be operating on the idea that we should make a separate face
> for every use. I don't think that is a good idea.
>
> I agree that it is more general, and in a certain sense it is cleaner.
> But I am concerned that it is also a lot of bloat, and I am not sure
> we can afford that.
>
> Absent the intention to make a separate face for every use,
> why should we install separate faces for rmail?
My primary concern was to avoid having different faces for the header
names, which I don't like. But I didn't want to make a change that
would change the default display of an email, so I added as many new
faces as required for the default display to stay the same.
Personally, I will be fine with just one `rmail-header-name' face.
This is the way `message-mode' does it, there is just one face for
every header name: `message-header-name'.
The patch below do this.
--- rmail.el.~1.448.~ 2008-02-10 21:13:03.000000000 +0000
+++ rmail.el 2008-02-12 04:05:42.000000000 +0000
@@ -345,6 +345,19 @@
face)
:group 'rmail-headers)
+(defface rmail-header-name-face
+ '((t (:inherit font-lock-function-name-face)))
+ "Face to use for highlighting the header names."
+ :group 'rmail-headers
+ :version "22.1")
+
+;;;###autoload
+(defcustom rmail-header-name 'rmail-header-name-face "\
+*Face to use for highlighting the header names."
+ :type '(choice (const :tag "Default" nil)
+ face)
+ :group 'rmail-headers)
+
;;;###autoload
(defcustom rmail-delete-after-output nil "\
*Non-nil means automatically delete a message that is copied to a file."
@@ -705,12 +718,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-face)
+ '("^Reply-To:.*$" . rmail-header-name-face)
+ '("^Subject:" . rmail-header-name-face)
+ '("^X-Spam-Status:" . rmail-header-name-face)
'("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):"
- . font-lock-keyword-face)
+ . rmail-header-name-face))
;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
`(,cite-chars
(,(concat "\\=[ \t]*"
@@ -721,7 +734,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-face))))))
"Additional expressions to highlight in Rmail mode.")
;; Perform BODY in the summary buffer
--
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 <=
- 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, 2008/02/12
- 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