all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* New custom faces for rmail.el
@ 2008-02-11 21:55 Bastien Guerry
  2008-02-12  3:51 ` Richard Stallman
  0 siblings, 1 reply; 14+ messages in thread
From: Bastien Guerry @ 2008-02-11 21:55 UTC (permalink / raw)
  To: emacs-devel

[-- 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-02-14  2:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 21:55 New custom faces for rmail.el Bastien Guerry
2008-02-12  3:51 ` 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

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.