]> git.wh0rd.org Git - nano.git/commitdiff
in nanorc.sample, banish " " whever possible in favor of "[[:space:]]"
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sun, 26 Jun 2005 03:26:24 +0000 (03:26 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sun, 26 Jun 2005 03:26:24 +0000 (03:26 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2763 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/nanorc.sample

index 2727c3a377023c230890dfe66f08695aaa3a707d..9e11e26f9a158857ad5713b07714b9ddf3b29a9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -356,6 +356,12 @@ CVS code -
        - Add "cxx" and "hxx" to the list of extensions that the
          "c-file" regexes apply to, and add "warning" and "error" to
          them as well. (Mike Frysinger)
+       - In the preprocessor directives regex string in the "c-file"
+         regexes, cover more whitespace characters than just " " by
+         using "[[:space:]]" instead. (Mike Frysinger)  DLR: Extend
+         this to other regex strings whenever possible.
+       - Move some overly long split-up regex strings that cover
+         similar areas onto the same line. (DLR)
 - nanorc.5:
        - Update the description of how the "color" regex works. (DLR)
        - Clarify descriptions of the characters that aren't allowed
index e65f5bbbee8f2fa38e04dd2955bb18e105e5692a..f099648a54e9d962f449d563bf12f678da97a993 100644 (file)
 # 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 "\<(try|throw|catch|operator|new|delete)\>"
-# color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
+# 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]?'"
 ##
 ## You will in general want your comments and strings to come last,
 ## because syntax highlighting rules will be applied in the order they
 ## are read in.
 ##
-# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
+# color brightyellow "<[^=[[:space:]]]*>" ""(\\.|[^\"])*""
 ##
 ## This string is VERY resource intensive!!!
-# color brightyellow start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
+# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*""
 ##
 ## And we want to have some nice comment highlighting too
 # color brightblue "//.*"
 ## Here is a short example for HTML
 # syntax "HTML" "\.html$"
 # color blue start="<" end=">"
-# color red "&[^; ]*;"
+# color red "&[^;[[:space:]]]*;"
 
 ## Here is a short example for TeX files
 # syntax "TeX" "\.tex$"
 ##
 # syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
 ## The argument of .nr or .ds
-# color cyan "^\.ds [^ ]*"
-# color cyan "^\.nr [^ ]*"
+# color cyan "^\.ds [^[[:space:]]]*"
+# color cyan "^\.nr [^[[:space:]]]*"
 ## Single character escapes
 # color brightmagenta "\\."
 ## Highlight the argument of \f or \s in the same color
 # color cyan "(\\|\\\\)n\(.."
 # color cyan start="(\\|\\\\)n\[" end="]"
 ## Requests
-# color brightgreen "^\. *[^ ]*"
+# color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
 ## Comments
 # color yellow "^\.\\\".*$"
 ## Strings
 ## Here is an example for perl
 ##
 # syntax "perl" "\.p[lm]$"
-# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>"
-# color red "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>"
-# color red "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>"
-# color red "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>"
-# color red "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
+# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
 # color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
 # color cyan start="[$@%]" end="( |\\W|-)"
 # color yellow "".*"|qq\|.*\|"
 # color blue "//.*"
 # color blue start="/\*" end="\*/"
 # color brightblue start="/\*\*" end="\*/"
-# color brightgreen,green " +$"
+# color brightgreen,green "[[:space:]]+$"
 
 ## Here is an example for patch files
 ##
 ##
 # syntax "nanorc" "(\.|/|)nanorc$"
 ## highlight possible errors and parameters
-# color brightwhite "^ *(set|unset|syntax|color).*$"
+# color brightwhite "^[[:space:]]*(set|unset|syntax|color).*$"
 ## set, unset and syntax
-# color cyan "^ *(set|unset) +(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete|regexp|smarthome|smooth)\>"
-# color cyan "^ *(set|unset) +(speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)"
-# color green "^ *(set|unset|syntax)\>"
+# color cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete)\>" "^[[:space:]]*(set|unset)[[:space:]]+(regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)\>"
+# color green "^[[:space:]]*(set|unset|syntax)\>"
 ## colors
-# color yellow "^ *color *(bright)?(white|black|red|blue|green|yellow|magenta|cyan)(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
-# color magenta "^ *color\>" "\<(start|end)="
+# color yellow "^[[:space:]]*color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
+# color magenta "^[[:space:]]*color\>" "\<(start|end)="
 ## strings
 # color white "\"(\\.|[^\"])*\""
 ## comments
-# color blue " *#.*$"
+# color blue "[[:space:]]*#.*$"