From: Bastien Guerry <bzg@altern.org>
To: emacs-devel@gnu.org
Subject: New custom faces for rmail.el
Date: Mon, 11 Feb 2008 21:55:53 +0000 [thread overview]
Message-ID: <87skzzf992.fsf@bzg.ath.cx> (raw)
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
For now rmail.el uses font-lock-* faces to highlight header fields like
From: or To:. The patch below defines new faces for the Subject: Date:
From: and To: header fields.
I'd like to commit this change. Comment?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rmail.el.patch --]
[-- Type: text/x-diff, Size: 3312 bytes --]
--- rmail.el.~1.448.~ 2008-02-10 21:13:03.000000000 +0000
+++ rmail.el 2008-02-11 21:08:25.000000000 +0000
@@ -345,6 +345,58 @@
face)
:group 'rmail-headers)
+(defface rmail-subject
+ '((t (:inherit font-lock-comment-face)))
+ "Face to use for highlighting the \"Subject:\" header field."
+ :group 'rmail-headers
+ :version "22.1")
+
+(defcustom rmail-subject-face 'rmail-subject "\
+*Face use be Rmail for highlighting the \"Subject:\" header field."
+ :type '(choice (const :tag "Default" nil)
+ face)
+ :group 'rmail-headers)
+
+(defface rmail-date
+ '((t (:inherit font-lock-string-face)))
+ "Face to use for highlighting the \"Date:\" header field."
+ :group 'rmail-headers
+ :version "22.1")
+
+(defcustom rmail-date-face 'rmail-date "\
+*Face use be Rmail for highlighting the \"Date:\" header field."
+ :type '(choice (const :tag "Default" nil)
+ face)
+ :group 'rmail-headers)
+
+(defface rmail-from
+ '((t (:inherit font-lock-function-name-face)))
+ "Face to use for highlighting the \"From:\" header field.
+Also used for this fields: Sender and Resent-From."
+ :group 'rmail-headers
+ :version "22.1")
+
+(defcustom rmail-from-face 'rmail-from "\
+*Face use be Rmail for highlighting the \"From:\" header field.
+Also used for this fields: Sender and Resent-From."
+ :type '(choice (const :tag "Default" nil)
+ face)
+ :group 'rmail-headers)
+
+(defface rmail-to
+ '((t (:inherit font-lock-keyword-face)))
+ "Face to use for highlighting the \"To:\" header field.
+Also used for this fields: Apparently-To, Cc and Newsgroups."
+ :group 'rmail-headers
+ :version "22.1")
+
+(defcustom rmail-to-face 'rmail-to "\
+*Face use be Rmail for highlighting the \"To:\" header field.
+Also used for this fields: Apparently-To, Cc and Newsgroups."
+ :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 +757,12 @@
(cite-prefix "a-z")
(cite-suffix (concat cite-prefix "0-9_.@-`'\"")))
(list '("^\\(From\\|Sender\\|Resent-From\\):"
- . font-lock-function-name-face)
+ . rmail-from-face)
'("^Reply-To:.*$" . font-lock-function-name-face)
- '("^Subject:" . font-lock-comment-face)
+ '("^Subject:" . rmail-subject-face)
'("^X-Spam-Status:" . font-lock-keyword-face)
'("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):"
- . font-lock-keyword-face)
+ . rmail-to-face)
;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
`(,cite-chars
(,(concat "\\=[ \t]*"
@@ -720,9 +772,10 @@
(beginning-of-line) (end-of-line)
(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))))
- "Additional expressions to highlight in Rmail mode.")
+ '("^\\(X-[a-z0-9-]+\\|In-reply-to\\):.*\\(\n[ \t]+.*\\)*$"
+ . font-lock-string-face)
+ '("^Date:.*\\(\n[ \t]+.*\\)*$" . rmail-date-face))))
+ "Additional expressions to highlight in Rmail mode.")
;; Perform BODY in the summary buffer
;; in such a way that its cursor is properly updated in its own window.
[-- Attachment #3: Type: text/plain, Size: 13 bytes --]
--
Bastien
next reply other threads:[~2008-02-11 21:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 21:55 Bastien Guerry [this message]
2008-02-12 3:51 ` New custom faces for rmail.el Richard Stallman
2008-02-12 4:15 ` Bastien
2008-02-12 5:46 ` Glenn Morris
2008-02-12 6:49 ` Bastien Guerry
2008-02-12 6:53 ` Miles Bader
2008-02-12 7:26 ` Bastien Guerry
2008-02-13 2:00 ` Xavier Maillard
2008-02-13 10:15 ` Andreas Schwab
2008-02-14 2:00 ` Xavier Maillard
2008-02-13 21:15 ` OT: A non-text attachment was scrubbed... (was: New custom faces for rmail.el) Reiner Steib
2008-02-13 22:05 ` New custom faces for rmail.el Bastien Guerry
2008-02-12 13:21 ` Stefan Monnier
2008-02-12 13:24 ` Bastien Guerry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87skzzf992.fsf@bzg.ath.cx \
--to=bzg@altern.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.