]> git.wh0rd.org Git - nano.git/commitdiff
add most of Mike Frysinger's "c-file" regex tweaks and improvements
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 4 Oct 2005 04:21:43 +0000 (04:21 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 4 Oct 2005 04:21:43 +0000 (04:21 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3036 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/nanorc.sample

index 0bb2313c7936bdb87c2c2c8e887aae38dde79b38..97c0e0a337c615daa924ccc2329f32deab174b58 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -389,6 +389,10 @@ CVS code -
        - Add regexes for Bourne shell scripts. (Mike Frysinger, minor
          tweaks by DLR)
        - Explain how the "none" and "default" syntaxes work. (DLR)
+       - Tweaks and additions to the "c-file" regexes: handle #defined
+         constants more accurately and use a brighter color for them,
+         support more GCC builtins, and color code flow control
+         statements differently. (Mike Frysinger)
 - doc/man/nanorc.5:
        - Explain how the "none" and "default" syntaxes work. (DLR)
 - doc/man/fr/nano.1, doc/man/fr/nanorc.5:
index 135e6ea875f817a2914c3729910d0bf47b5ec892..f42b49493a25114b53830b2ed4707ddef6fea1a4 100644 (file)
 ## to set the background color to black or white.
 ##
 # syntax "c-file" "\.(c|C|cc|cpp|cxx|h|H|hh|hpp|hxx)$"
-# color red "\<[A-Z_]{2,}\>" 
+# color brightred "\<[A-Z_][A-Z_0-9]+\>" 
 # color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
 # color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
-# color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>"
+# color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
 # color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
+# color magenta "\<(goto|continue|break|return)\>"
 # color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
 # color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'"
 ##
 ## GCC builtins
 ##
-# color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(asm|builtin|inline|restrict|typeof)__"
+# color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
 ##
 ## You will in general want your comments and strings to come last,
 ## because syntax highlighting rules will be applied in the order they