3 %; This file shows how to use function escapes to enable hilighting
4 %; sequences for terminals that have the appropriate entries in their
5 %; termcap/terminfo files. Also it goes into more detail on exactly
6 %; what each line does.
8 %; See mh-format(5) for more information on these function escapes.
11 %; First, test to see if this is the current message. If it is, then
12 %; output the bold sequence for this terminal. We use %(zputlit) so the
13 %; characters we output don't count against the terminal width.
15 %<(cur)%(zputlit(bold))%>\
17 %; If it's unseen, mark it with an underline
19 %<(unseen)%(zputlit(underline))%>\
21 %; Next, output the message number. We print it out using 4 digits, right-
22 %; justified, padding with spaces.
26 %; If it's the current message, output a '+' in the next column, otherwise
27 %; a space. Also use '-' if it's got a "Replied" header and 'E' if it's
28 %; encrypted (not currently supported)
30 %<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
32 %; Output the date, but mark it with a '*' if it's missing and was synthesized.
33 %; Note the use of 02 to make sure the date is padded with a leading zero.
35 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
37 %; If the message is from me, print out who the message was sent to.
38 %; Otherwise, print out who it was from.
39 %<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
40 %<(zero)%17(decode(friendly{from}))%> \
42 %; Print out the subject and any of th mesage body that will fit on the
43 %; rest of the line. After that, print the terminal reset code to reset
44 %; all of the attributes to the next line.
46 %; There's actually special handling in the format engine that will output
47 %; any data specified with %(zputlit) even if you've exceeded the column
48 %; width, so it's safe to put any reset characters at the end; they'll
51 %(decode{subject})%<{body}<<%{body}>>%>%(zputlit(resetterm))