From 213294e69cdc0c78279eff43670b43eb594889e3 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 29 Aug 2015 19:52:03 +0000 Subject: [PATCH] Adding a file: syntax colouring for Autoconf files. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5367 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 5 ++++- doc/syntax/autoconf.nanorc | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 doc/syntax/autoconf.nanorc diff --git a/ChangeLog b/ChangeLog index e1d91037..29f1a953 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2015-08-29 Benno Schulenberg + * doc/syntax/autoconf.nanor: New file; syntax colouring for Autoconf. + 2015-08-16 Benno Schulenberg * src/help.c (help_init, help_line_len): Avoid wide paragraphs of text in the help screens: wrap them at 74 columns if the screen is wider. @@ -12,7 +15,7 @@ * src/nano.c (make_new_opennode), src/files.c (initialize_buffer): Remove some duplication in the initialization of a new openfile node. * src/nano.c (make_new_opennode): Don't bother setting things to NULL - when they will be intialized right away. + when they will be initialized right away. * src/files.c (make_new_buffer): Don't bother with a separate function when it's used only once, right there. * src/help.c (help_init): Since the new SIGWINCH handling, a resizing diff --git a/doc/syntax/autoconf.nanorc b/doc/syntax/autoconf.nanorc new file mode 100644 index 00000000..5760c3cd --- /dev/null +++ b/doc/syntax/autoconf.nanorc @@ -0,0 +1,28 @@ +## Here is an example for Autoconf. + +syntax "autoconf" "\.ac$" + +# Keywords: +color yellow "\<(if|test|then|else|fi|for|in|do|done)\>" +color yellow "(=|!=|&&|\|\|)" + +# Macros: +color cyan "\<[[:upper:]_[:digit:]]+\>" + +# Version numbers: +color red "\<[-_.0-9]+\>" + +# Strings: +color red "\"[^"]*\"" "\'[^']*\'" + +# Backticks: +color green "`[^`]*`" + +# Error lines: +color black "^\*\*\*.*" + +# Brackets: +color magenta "\[|\]|\(|\)" + +# Comments: +color blue "^[[:blank:]]*#.*" "^dnl.*" -- 2.39.5