GNU bug report logs -
#26037
25.1; perl-mode add syntax support for subroutine signatures
Previous Next
Reported by: Evgeni Kolev <evgeni.d.kolev <at> gmail.com>
Date: Thu, 9 Mar 2017 17:25:02 UTC
Severity: wishlist
Tags: fixed, patch
Found in version 25.1
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #28 received at 26037 <at> debbugs.gnu.org (full text, mbox):
Евгени Колев <evgenysw <at> gmail.com> writes:
> The regex is now updated to include all the chars $%&*;@[\]
>
> I got the list of chars from here
> http://perldoc.perl.org/perlsub.html#Prototypes
It looks like "+" is another possible character:
The + prototype is a special alternative to $ that will act like
\[@%] when given a literal array or hash variable, but will
otherwise force scalar context on the argument. This is useful for
functions which should accept either a literal array or an array
reference as the argument:
sub mypush (+@) {
>
> This is the diff, please let me if it can be improved:
>
> ;; Funny things in `sub' arg-specs like `sub myfun ($)' or `sub ($)'.
> ;; Be careful not to match "sub { (...) ... }".
> - ("\\<sub\\(?:[\s\t\n]+\\(?:\\sw\\|\\s_\\)+\\)?[\s\t\n]*(\\([^)]+\\))"
> + ("\\<sub\\(?:[\s\t\n]+\\(?:\\sw\\|\\s_\\)+\\)?[\s\t\n]*(\\([][$%&*;@\\]+\\))"
Please update the comment too.
And if it's not too much trouble could you add a commit message as
described in CONTRIBUTE? (And then post the output from 'git
format-patch' instead of 'git diff')
This bug report was last modified 8 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.