[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] syntax: perl: don't color the character after a var
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name |
Date: |
Sun, 4 Aug 2019 12:53:25 +0200 |
Is there someone on this list who knows Perl and can confirm
or deny the correctness of this change?
This fixes https://savannah.gnu.org/bugs/?56713.
Bug existed since version 1.2.2, commit 70047eef.
---
syntax/perl.nanorc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/syntax/perl.nanorc b/syntax/perl.nanorc
index 932540cd..340ae0a2 100644
--- a/syntax/perl.nanorc
+++ b/syntax/perl.nanorc
@@ -7,7 +7,10 @@ comment "#"
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)\>"
-icolor cyan start="[$@%]" end="( |[^0-9A-Z_]|-)"
+
+# Variable names.
+color cyan "[$@%][0-9A-Za-z_]+"
+
color yellow "".*"|qq\|.*\|"
color white "[sm]/.*/"
color white start="(^use| = new)" end=";"
--
2.22.0
- [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name,
Benno Schulenberg <=
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/04
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/06
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/06
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/07
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/08
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/08
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/08
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/09
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/09
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/10