[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] tweak regexes for POSIX
From: |
Mike Frysinger |
Subject: |
[Nano-devel] [PATCH] tweak regexes for POSIX |
Date: |
Mon, 17 Aug 2009 20:25:07 -0400 |
Some of the current regexes use the empty sub expressions GNU extension.
But this isn't in POSIX so some implementations whine.
Signed-off-by: Mike Frysinger <address@hidden>
---
this addresses:
http://bugs.gentoo.org/263836
https://savannah.gnu.org/bugs/?27175
doc/syntax/gentoo.nanorc | 6 +++---
doc/syntax/sh.nanorc | 2 +-
doc/syntax/tcl.nanorc | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/syntax/gentoo.nanorc b/doc/syntax/gentoo.nanorc
index 8bafe2d..319b81b 100644
--- a/doc/syntax/gentoo.nanorc
+++ b/doc/syntax/gentoo.nanorc
@@ -20,10 +20,10 @@ color brightblue
"\<e(begin|end|conf|install|make|qmake[34]|ant|(qa)?warn|infon?
color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>"
"\<e(aclocal|auto(reconf|header|conf|make))\>"
color brightblue "\<built_with_use\>" "\<make_desktop_entry\>"
"\<unpack(_(makeself|pdv))?\>"
color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>"
"\<(has|best)_version\>"
-color brightblue
"\<(do|new)(ins|(games)?s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
+color brightblue
"\<(do|new)(ins|(games)?s?bin|doc|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
-color brightblue "prepall(|docs|info|man|strip)"
"prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)"
-color brightblue "\<(|doc|ins|exe)into\>" "\<(f|games)(owners|perms)\>"
"\<(exe|ins|dir)opts\>"
+color brightblue "prepall(docs|info|man|strip)?"
"prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)"
+color brightblue "\<(doc|ins|exe)?into\>" "\<(f|games)(owners|perms)\>"
"\<(exe|ins|dir)opts\>"
## Highlight common commands used in ebuilds
color blue "\<make\>"
"\<(awk|cat|cd|chmod|chown|cp|echo|env|export|find|e?grep|ln|mkdir|mv|rm|sed|set|tar|touch|unset|xargs)\>"
## Highlight comments (doesnt work that well)
diff --git a/doc/syntax/sh.nanorc b/doc/syntax/sh.nanorc
index 61098e3..ecce22e 100644
--- a/doc/syntax/sh.nanorc
+++ b/doc/syntax/sh.nanorc
@@ -1,7 +1,7 @@
## Here is an example for Bourne shell scripts.
##
syntax "sh" "\.sh$"
-header "^#!.*/(ba|k|pdk|)sh[-0-9_]*"
+header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"
icolor brightgreen "^[0-9A-Z_]+\(\)"
color green
"\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
diff --git a/doc/syntax/tcl.nanorc b/doc/syntax/tcl.nanorc
index 15526c1..ad3401f 100644
--- a/doc/syntax/tcl.nanorc
+++ b/doc/syntax/tcl.nanorc
@@ -13,4 +13,4 @@ color green "(\(|\)|\;|`|\\|\$|<|>|!|=|&|\|)"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
icolor brightred "address@hidden"
color ,green "[[:space:]]+$"
-color ,magenta "^([[:space:]]+|)#.*"
+color ,magenta "^[[:space:]]*#.*"
--
1.6.4
- [Nano-devel] [PATCH] tweak regexes for POSIX,
Mike Frysinger <=