File: mail.jsf

package info (click to toggle)
ne 3.3.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,192 kB
  • sloc: ansic: 28,739; perl: 571; makefile: 265; sh: 9
file content (197 lines) | stat: -rw-r--r-- 2,858 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# JOE syntax highlight file for typical UNIX mail files
# 2004-04-25 Tomas Szepe <szepe@pinerecords.com>

# Improved to handle quote characters commonly seen on Usenet, and
# highlighting of the more frequently edited mail and news headers, with
# some sanity checking of the same.
# 2004-06-26 Jeff Hurwit <darkmoon@verizon.net>

-

=Idle
=Head	bold
=HdTo	red bg_white
=HdFrom	bold red
=HdSbj	bold magenta
=HdDate	bold
=HdRRT	black bg_white
=HdGrp	bold white bg_red
=HdFuT	bold red bg_yellow
=HdBad	bold red
=Quot1	green bg_white
=Quot2	bold blue bg_white
=Sign	bold magenta

# Start in headers. We know we're out at the first blank line.

:first Idle
	*		hbol		noeat
	"\n"		newline
	">|:~}#]"	newline		noeat

# Require header
#	"\n"		nohead

:nohead HdBad
	*		nohead

:hbol Idle
	*		hbad		recolor=-1
	"\n"		newline
	"A-Z"		bufhdrs		buffer
	"-"		newline		noeat

:hbad HdBad
	*		hbad
	"\n"		hbol

:hlbad HdBad
	*		hbol

:bufhdrs Idle
	*		hbad		recolor=-1
	"\n"		hlbad		noeat recolor=-2
	"-_a-zA-Z0-9"	bufhdrs
	":"		headers		hold

:headers Idle
	*		hbad		recolor=-1
	" \n"		hnocolor	noeat strings
	"To"		hsto		recolor=-2
	"Cc"		hsto		recolor=-2
	"Bcc"		hsto		recolor=-2
	"From"		hsfrom		recolor=-2
	"Subject"	hssbj		recolor=-2
	"Date"		hsdate		recolor=-2
	"Return-Receipt-To"	hsrrecp	recolor=-2
	"Newsgroups"	hsgroups	recolor=-2
	"Followup-To"	hsfolup		recolor=-2
done

:hnocolor Idle
	*		hnocolor
	"\n"		cont_nocolor

:cont_nocolor Idle
	*		hbol		noeat
	" \t"		hnocolor	recolor=-1

:hsto Head
	*		hto
	"\n"		hbol

:hto HdTo
	*		hto
	"\n"		cont_to

:cont_to HdTo
	*		hbol		noeat
	" \t"		hto		recolor=-1

:hsfrom Head
	*		hfrom
	"\n"		hbol

:hfrom HdFrom
	*		hfrom
	"\n"		hbol

:hssbj Head
	*		hsbj
	"\n"		hbol

:hsbj HdSbj
	*		hsbj
	"\n"		cont_sbj

:cont_sbj HdSbj
	*		hbol		noeat
	" \t"		hsbj		recolor=-1

:hsdate Head
	*		hdate
	"\n"		hbol

:hdate HdDate
	*		hdate
	"\n"		hbol

:hsrrecp Head
	*		hrrecp
	"\n"		hbol

:hrrecp HdRRT
	*		hrrecp
	"\n"		hbol

:hsgroups Head
	*		hgroups
	"\n"		hbol

:hgroups HdGrp
	*		hgroups
	"\n"		hbol

:hsfolup Head
	*		hfolup
	"\n"		hbol

:hfolup HdFuT
	*		hfolup
	"\n"		hbol

# body of the message

:newline Idle
	*		knocolor
	"\n"		newline
	">|:~}#]"	q1		recolor=-1
	"-"		maybesign1	recolor=-1

:maybesign1 Quot1
	*		q1
	" \t"		q1
	"\n"		newline		recolor=-1
	">|:~}#]"	q2		recolor=-1
	"-"		maybesign2	recolor=-1

:maybesign2 Quot2
	*		q2
	"\t"		q2
	"\n"		newline		recolor=-1
	" "		maybesign3	recolor=-1
	">|:~}#]"	q1		recolor=-1
	"-"		knocolor	recolor=-3

:maybesign3 Quot2
	*		q2
	" \t"		q2
	"\n"		sign		recolor=-4
	"->|:~}#]"	q1		recolor=-1

:sign Sign
	*		sign

:q1 Quot1
	*		kq1
	"\n"		newline
	" \t"		q1
	"->|:~}#]"	q2		recolor=-1

:q2 Quot2
	*		kq2
	"\n"		newline
	" \t"		q2
	"->|:~}#]"	q1		recolor=-1

:knocolor Idle
	*		knocolor
	"\n"		newline

:kq1 Quot1
	*		kq1
	"\n"		newline

:kq2 Quot2
	*		kq2
	"\n"		newline