1 Return-Path: <aneesh.kumar@linux.vnet.ibm.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 86859431FAE
\r
6 for <notmuch@notmuchmail.org>; Fri, 27 Nov 2009 00:42:32 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id PnN-lrSxYrDN for <notmuch@notmuchmail.org>;
\r
11 Fri, 27 Nov 2009 00:42:31 -0800 (PST)
\r
12 Received: from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140])
\r
13 by olra.theworths.org (Postfix) with ESMTP id 58C77431FBC
\r
14 for <notmuch@notmuchmail.org>; Fri, 27 Nov 2009 00:42:31 -0800 (PST)
\r
15 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245])
\r
16 by e23smtp07.au.ibm.com (8.14.3/8.13.1) with ESMTP id nAR8gT8T029303
\r
17 for <notmuch@notmuchmail.org>; Fri, 27 Nov 2009 19:42:29 +1100
\r
18 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96])
\r
19 by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id
\r
21 for <notmuch@notmuchmail.org>; Fri, 27 Nov 2009 19:42:29 +1100
\r
22 Received: from d23av01.au.ibm.com (loopback [127.0.0.1])
\r
23 by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id
\r
25 for <notmuch@notmuchmail.org>; Fri, 27 Nov 2009 19:42:29 +1100
\r
26 Received: from localhost.localdomain (N20wks267599wss.in.ibm.com
\r
28 by d23av01.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id
\r
29 nAR8gRvb004813; Fri, 27 Nov 2009 19:42:28 +1100
\r
30 From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
\r
31 To: notmuch@notmuchmail.org
\r
32 Date: Fri, 27 Nov 2009 14:12:12 +0530
\r
34 <1259311332-14557-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
\r
35 X-Mailer: git-send-email 1.6.5.2.74.g610f9
\r
37 <1259311332-14557-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
\r
39 <1259125080-18708-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
\r
40 <1259311332-14557-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
\r
41 Subject: [notmuch] [PATCH -v5] notmuch.el: Use message-mode font-face to
\r
42 highlight mail headers
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.12
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Fri, 27 Nov 2009 08:42:32 -0000
\r
57 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
\r
59 notmuch.el | 35 +++++++++++++++++++++++++++++++++--
\r
60 1 files changed, 33 insertions(+), 2 deletions(-)
\r
62 diff --git a/notmuch.el b/notmuch.el
\r
63 index 89ccef6..851c60c 100644
\r
66 @@ -595,6 +595,38 @@ which this thread was originally shown."
\r
67 (set-marker beg nil)
\r
68 (set-marker end nil)
\r
70 +(defun notmuch-fontify-headers ()
\r
72 + (if (looking-at "[Tt]o:")
\r
74 + (overlay-put (make-overlay (point) (re-search-forward ":"))
\r
75 + 'face 'message-header-name)
\r
76 + (overlay-put (make-overlay (point) (re-search-forward ".*$"))
\r
77 + 'face 'message-header-to)))
\r
78 + (beginning-of-line)
\r
79 + (if (looking-at "[B]?[Cc][Cc]:")
\r
81 + (overlay-put (make-overlay (point) (re-search-forward ":"))
\r
82 + 'face 'message-header-name)
\r
83 + (overlay-put (make-overlay (point) (re-search-forward ".*$"))
\r
84 + 'face 'message-header-cc)))
\r
85 + (beginning-of-line)
\r
86 + (if (looking-at "[Ss]ubject:")
\r
88 + (overlay-put (make-overlay (point) (re-search-forward ":"))
\r
89 + 'face 'message-header-name)
\r
90 + (overlay-put (make-overlay (point) (re-search-forward ".*$"))
\r
91 + 'face 'message-header-subject)))
\r
92 + (beginning-of-line)
\r
93 + (if (looking-at "[Ff]rom:")
\r
95 + (overlay-put (make-overlay (point) (re-search-forward ":"))
\r
96 + 'face 'message-header-name)
\r
97 + (overlay-put (make-overlay (point) (re-search-forward ".*$"))
\r
98 + 'face 'message-header-other)))
\r
99 + (beginning-of-line)
\r
103 (defun notmuch-show-markup-header (depth)
\r
104 (re-search-forward notmuch-show-header-begin-regexp)
\r
105 @@ -615,8 +647,7 @@ which this thread was originally shown."
\r
107 (while (looking-at "[A-Za-z][-A-Za-z0-9]*:")
\r
108 (beginning-of-line)
\r
109 - (overlay-put (make-overlay (point) (re-search-forward ":"))
\r
111 + (notmuch-fontify-headers)
\r
114 (indent-rigidly beg end depth)
\r