dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

mail.jsf (2873B)


      1 # JOE syntax highlight file for typical UNIX mail files
      2 # 2004-04-25 Tomas Szepe <szepe@pinerecords.com>
      3 
      4 # Improved to handle quote characters commonly seen on Usenet, and
      5 # highlighting of the more frequently edited mail and news headers, with
      6 # some sanity checking of the same.
      7 # 2004-06-26 Jeff Hurwit <darkmoon@verizon.net>
      8 
      9 -
     10 
     11 =Idle
     12 =Head	+Statement +Keyword
     13 =Email	+Escape +Head
     14 =HdTo	+Email
     15 =HdFrom +Email
     16 =HdSbj	+Title +String +Constant +Head
     17 =HdDate	+Number +Constant +Head
     18 =HdRRT	+Email
     19 =HdGrp	+Email
     20 =HdFuT	+Email
     21 =HdBad	+Bad
     22 =Quot1	+Comment
     23 =Quot2	+DefinedIdent
     24 =Sign	+Preproc
     25 
     26 # Start in headers. We know we're out at the first blank line.
     27 
     28 :first Idle
     29 	*		hbol		noeat
     30 	"\n"		newline
     31 	">|:~}#]"	newline		noeat
     32 
     33 # Require header
     34 #	"\n"		nohead
     35 
     36 :nohead HdBad
     37 	*		nohead
     38 
     39 :hbol Idle
     40 	*		hbad		recolor=-1
     41 	"\n"		newline
     42 	"A-Z"		bufhdrs		buffer
     43 	"-"		newline		noeat
     44 
     45 :hbad HdBad
     46 	*		hbad
     47 	"\n"		hbol
     48 
     49 :hlbad HdBad
     50 	*		hbol
     51 
     52 :bufhdrs Idle
     53 	*		hbad		recolor=-1
     54 	"\n"		hlbad		noeat recolor=-2
     55 	"-_a-zA-Z0-9"	bufhdrs
     56 	":"		headers		hold
     57 
     58 :headers Idle
     59 	*		hbad		recolor=-1
     60 	" \n"		hnocolor	noeat strings
     61 	"To"		hsto		recolor=-2
     62 	"Cc"		hsto		recolor=-2
     63 	"Bcc"		hsto		recolor=-2
     64 	"From"		hsfrom		recolor=-2
     65 	"Subject"	hssbj		recolor=-2
     66 	"Date"		hsdate		recolor=-2
     67 	"Return-Receipt-To"	hsrrecp	recolor=-2
     68 	"Newsgroups"	hsgroups	recolor=-2
     69 	"Followup-To"	hsfolup		recolor=-2
     70 done
     71 
     72 :hnocolor Idle
     73 	*		hnocolor
     74 	"\n"		cont_nocolor
     75 
     76 :cont_nocolor Idle
     77 	*		hbol		noeat
     78 	" \t"		hnocolor	recolor=-1
     79 
     80 :hsto Head
     81 	*		hto
     82 	"\n"		hbol
     83 
     84 :hto HdTo
     85 	*		hto
     86 	"\n"		cont_to
     87 
     88 :cont_to HdTo
     89 	*		hbol		noeat
     90 	" \t"		hto		recolor=-1
     91 
     92 :hsfrom Head
     93 	*		hfrom
     94 	"\n"		hbol
     95 
     96 :hfrom HdFrom
     97 	*		hfrom
     98 	"\n"		hbol
     99 
    100 :hssbj Head
    101 	*		hsbj
    102 	"\n"		hbol
    103 
    104 :hsbj HdSbj
    105 	*		hsbj
    106 	"\n"		cont_sbj
    107 
    108 :cont_sbj HdSbj
    109 	*		hbol		noeat
    110 	" \t"		hsbj		recolor=-1
    111 
    112 :hsdate Head
    113 	*		hdate
    114 	"\n"		hbol
    115 
    116 :hdate HdDate
    117 	*		hdate
    118 	"\n"		hbol
    119 
    120 :hsrrecp Head
    121 	*		hrrecp
    122 	"\n"		hbol
    123 
    124 :hrrecp HdRRT
    125 	*		hrrecp
    126 	"\n"		hbol
    127 
    128 :hsgroups Head
    129 	*		hgroups
    130 	"\n"		hbol
    131 
    132 :hgroups HdGrp
    133 	*		hgroups
    134 	"\n"		hbol
    135 
    136 :hsfolup Head
    137 	*		hfolup
    138 	"\n"		hbol
    139 
    140 :hfolup HdFuT
    141 	*		hfolup
    142 	"\n"		hbol
    143 
    144 # body of the message
    145 
    146 :newline Idle
    147 	*		knocolor
    148 	"\n"		newline
    149 	">|:~}#]"	q1		recolor=-1
    150 	"-"		maybesign1	recolor=-1
    151 
    152 :maybesign1 Quot1
    153 	*		q1
    154 	" \t"		q1
    155 	"\n"		newline		recolor=-1
    156 	">|:~}#]"	q2		recolor=-1
    157 	"-"		maybesign2	recolor=-1
    158 
    159 :maybesign2 Quot2
    160 	*		q2
    161 	"\t"		q2
    162 	"\n"		newline		recolor=-1
    163 	" "		maybesign3	recolor=-1
    164 	">|:~}#]"	q1		recolor=-1
    165 	"-"		knocolor	recolor=-3
    166 
    167 :maybesign3 Quot2
    168 	*		q2
    169 	" \t"		q2
    170 	"\n"		sign		recolor=-4
    171 	"->|:~}#]"	q1		recolor=-1
    172 
    173 :sign Sign
    174 	*		sign
    175 
    176 :q1 Quot1
    177 	*		kq1
    178 	"\n"		newline
    179 	" \t"		q1
    180 	"->|:~}#]"	q2		recolor=-1
    181 
    182 :q2 Quot2
    183 	*		kq2
    184 	"\n"		newline
    185 	" \t"		q2
    186 	"->|:~}#]"	q1		recolor=-1
    187 
    188 :knocolor Idle
    189 	*		knocolor
    190 	"\n"		newline
    191 
    192 :kq1 Quot1
    193 	*		kq1
    194 	"\n"		newline
    195 
    196 :kq2 Quot2
    197 	*		kq2
    198 	"\n"		newline