[to Vim_Dev cc to maintainer Gautam Iyer] On Tue, 15 Jan 2008 21:38:13 +0100, Bram Moolenaar wrote:
> Nevertheless, most email programs know how to escape these lines (that's > what happened above), so they are not really special when editing a > message. Only when you actually edit the mbox file, but that's > uncommon. We could create a separate "mbox" filetype for that. Only "^From\s" is tested, but we have year at end of line. I had fixed lines 27-28 and added Usenet header fields. -- Patrick Texier, Frulon, 36190 Orsennes, France (46°31'N, 01°41'E) <http://www.genindre.org> <http://www.genindre.org/cgi-bin/geneweb.cgi?b=pt> --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
*** runtime/syntax/mail.vim Sat May 12 13:10:08 2007 --- custom/syntax/mail.vim Wed Jan 16 09:15:18 2008 *************** *** 24,36 **** " emails " According to RFC 2822 any printable ASCII character can appear in a field " name, except ':'. ! syn region mailHeader [EMAIL PROTECTED],@NoSpell start="^From " skip="^\s" end="\v^[!-9;-~]*([^!-~]|$)"me=s-1 ! syn match mailHeaderKey contained contains=mailEmail,@NoSpell "^From\s.*$" syn case ignore " Nothing else depends on case. Headers in properly quoted (with "> " or ">") " emails are matched ! syn region mailHeader keepend [EMAIL PROTECTED],@mailQuoteExps,@NoSpell start="^\z(\(> \?\)*\)\v(newsgroups|from|((in-)?reply-)?to|b?cc|subject|return-path|received|date|replied):" skip="^\z1\s" end="\v^\z1[!-9;-~]*([^!-~]|$)"me=s-1 end="[EMAIL PROTECTED]"me=s-1 end="\v^\z1(\> ?)+"me=s-1 syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps,@NoSpell start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$" syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$" --- 24,38 ---- " emails " According to RFC 2822 any printable ASCII character can appear in a field " name, except ':'. ! syn region mailHeader [EMAIL PROTECTED],@NoSpell start="^From .*\d\d\d\d$" skip="^\s" end="\v^[!-9;-~]*([^!-~]|$)"me=s-1 ! syn match mailHeaderKey contained contains=mailEmail,@NoSpell "^From\s.*\d\d\d\d$" + " Usenet headers + syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(Newsgroups|Followup-To|Message-ID|Supersedes|Control):.*$" syn case ignore " Nothing else depends on case. Headers in properly quoted (with "> " or ">") " emails are matched ! syn region mailHeader keepend [EMAIL PROTECTED],@mailQuoteExps,@NoSpell start="^\z(\(> \?\)*\)\v(newsgroups|x-([a-z\-])*|path|xref|message-id|from|((in-)?reply-)?to|b?cc|subject|return-path|received|date|replied):" skip="^\z1\s" end="\v^\z1[!-9;-~]*([^!-~]|$)"me=s-1 end="[EMAIL PROTECTED]"me=s-1 end="\v^\z1(\> ?)+"me=s-1 syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps,@NoSpell start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$" syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$"
