From 4f9bebddec5cccb3a0664ef088a59eb587d17315 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 10 Apr 2020 12:56:41 +0200 Subject: [PATCH] syntax: email: rename file and syntax, away from the mistaken 'mutt' Also, colorize lines that are multiply quoted, and email addresses, and URLs. --- syntax/Makefile.am | 2 +- syntax/email.nanorc | 17 +++++++++++++++++ syntax/mutt.nanorc | 9 --------- 3 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 syntax/email.nanorc delete mode 100644 syntax/mutt.nanorc diff --git a/syntax/Makefile.am b/syntax/Makefile.am index 4140dee0..d0bd851f 100644 --- a/syntax/Makefile.am +++ b/syntax/Makefile.am @@ -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 \ diff --git a/syntax/email.nanorc b/syntax/email.nanorc new file mode 100644 index 00000000..6818d2ff --- /dev/null +++ b/syntax/email.nanorc @@ -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="^>* ?$" diff --git a/syntax/mutt.nanorc b/syntax/mutt.nanorc deleted file mode 100644 index 97cfcd1e..00000000 --- a/syntax/mutt.nanorc +++ /dev/null @@ -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="^>* ?$"