syntax: email: rename file and syntax, away from the mistaken 'mutt'

Also, colorize lines that are multiply quoted, and email addresses,
and URLs.
master
Benno Schulenberg 2020-04-10 12:56:41 +02:00
parent edf2d8d68f
commit 4f9bebddec
3 changed files with 18 additions and 10 deletions

View File

@ -8,6 +8,7 @@ pkgdata_DATA = asm.nanorc \
debian.nanorc \
default.nanorc \
elisp.nanorc \
email.nanorc \
fortran.nanorc \
gentoo.nanorc \
go.nanorc \
@ -21,7 +22,6 @@ pkgdata_DATA = asm.nanorc \
makefile.nanorc \
man.nanorc \
mgp.nanorc \
mutt.nanorc \
nanohelp.nanorc \
nanorc.nanorc \
nftables.nanorc \

17
syntax/email.nanorc Normal file
View File

@ -0,0 +1,17 @@
## Syntax highlighting for emails.
syntax email "\.eml$"
# Quoted lines.
color green "^>.*"
color cyan "^> ?>.*"
color yellow "^> ?> ?>.*"
# Email addresses.
color brightmagenta "<[^@]+@[^@]+>"
# URLs.
color brightblue "(https?|ftp)://\S+\.\S+[^\s.)]"
# Signatures, even quoted ones.
color yellow start="^>* ?-- $" end="^>* ?$"

View File

@ -1,9 +0,0 @@
## Here is an example for quoted emails (under e.g. mutt).
syntax mutt
# Quoted lines.
color green "^>.*"
# Signatures, even quoted ones.
color yellow start="^>* ?-- $" end="^>* ?$"