diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-07-23 23:12:35 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-26 02:05:46 +0000 |
commit | 777e9161f2618944eeea7d5d905f3aecb32ba4d6 (patch) | |
tree | 978fa4646fabf9c3ca011f13dd15f7324b225b4a /emacs | |
parent | e3c7ef20866011e0e98de5b78863094f34fd2bd6 (diff) | |
download | perl-777e9161f2618944eeea7d5d905f3aecb32ba4d6.tar.gz |
fix emacs/ptags for PL_* changes
Message-Id: <199807240712.DAA04204@monk.mps.ohio-state.edu>
Subject: [PATCH 5.004_76] Yet better ptags
p4raw-id: //depot/maint-5.005/perl@1653
Diffstat (limited to 'emacs')
-rwxr-xr-x | emacs/ptags | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/emacs/ptags b/emacs/ptags index c32a1289ec..c672612237 100755 --- a/emacs/ptags +++ b/emacs/ptags @@ -14,15 +14,18 @@ # Use Hallvard's scan for XS files - since he processes the "C" part too - # but with a lot of improvements: now it is no worse than CPerl's one. -# Avoid builitin on OS/2: +# Avoid builtin on OS/2: if test ! -z "$OS2_SHELL"; then alias find=gnufind; fi # Insure proper order (.h after .c, .xs before .c in subdirs): -topfiles="`echo ' ' *.y *.c *.h ' ' | sed 's/ embed.h / /' | sed 's/ globals.c / /'`" +# Move autogenerated less-informative files to the end: +# Hard to do embed.h and embedvar.h in one sweep: + +topfiles="`echo ' ' *.y *.c *.h ' ' | sed 's/ \(embed\(var\|\)\.h\|obj\(pp\|XSUB\)\.h\|globals\.c\) \(\(embedvar\|objpp\).h \|\)/ /g'`" subdirfiles="`( find ./*/* -name '*.[cy]' -print | sort ; find ./*/* -name '*.[hH]' -print | sort )`" xsfiles="`find . -name '*.xs' -print | sort`" -# etags -d : process defineds too (default now) +# etags -d : process defines too (default now) # These are example lines for global variables and PP-code: ## IEXT SV * Iparsehook; @@ -32,10 +35,12 @@ xsfiles="`find . -name '*.xs' -print | sort`" ## PERLVARI(Grsfp, PerlIO *, Nullfp) ## PERLVAR(cvcache, HV *) +# Putting PL_\1 in the substitution line makes etags dump core +# Thus we do it later (but 20.2.92 does it OK). set x -d -l c \ -r '/[dI]?EXT\(CONST\)?[ \t*]+\([a-zA-Z_0-9]+[ \t*]+\)*\([a-zA-Z_0-9]+\)[ \t]*\($\|;\|\[\|[ \t]I+NIT[ \t]*(\|\/\*\)/\3/' \ -r '/IEXT[ \t][^\/]*[ \t*]I\([a-zA-Z_][a-zA-Z_0-9]*\)[\[; \t]/\1/' \ - -r '/PERLVAR[a-zA-Z_0-9]*[ \t]*([ \t]*[GIT]?\([a-zA-Z_][a-zA-Z_0-9]*\)[ \t]*,/\1/' \ + -r '/PERLVAR[a-zA-Z_0-9]*[ \t]*([ \t]*[GIT]?\([a-zA-Z_][a-zA-Z_0-9]*\)[ \t]*[\[,]/\1/' \ -r '/PP[ \t]*([ \t]*\([^ \t()]*\)[ \t]*)/\1/' shift @@ -47,8 +52,24 @@ etags -o TAGS.tmp \ -l none -r '/#\(\$[a-zA-Z_0-9]+\|define\)[ \t]+\([a-zA-Z_0-9]+\)/\2/' \ config_h.SH etags -o TAGS.tmp -a "$@" $topfiles + +# Now add these PL_: +perl -w014pe 'if (s/^( .* PERLVAR I? # 1: TAG group + \s* \( \s* [GIT] # + .* # + \x7F # End of description + ) + ( .* \x1 ) # 2: Exact group + /${1}PL_$2/mgx) { # Add PL_ + $chars = chomp; + s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e; + $_ .= ("\f" x $chars); + }' TAGS.tmp > TAGS.tm1 && mv TAGS.tm1 TAGS.tmp + + + etags -o TAGS.tmp -a -D -l none -r '/#define.*\t\(Perl_.*\)/\1/' embed.h -etags -o TAGS.tmp -a globals.c +etags -o TAGS.tmp -a globals.c embedvar.h objXSUB.h objpp.h perl -w014pe 'if (s/^( [^\n\x7F\x1]*\b # 1: TAG group (\w+) # 2: word |