X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=emacs%2Fptags;h=55512014ff4f4c73ada3e97f212655fdabb6530d;hb=1779d84dfb511a39bc8c645afc698f9dce95ef29;hp=7570220218bc194451b699a8cd2eea665c499955;hpb=51371543ca1a75ed152020ad0846b5b8cf11c32f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/emacs/ptags b/emacs/ptags index 7570220..5551201 100755 --- a/emacs/ptags +++ b/emacs/ptags @@ -21,7 +21,7 @@ if test ! -z "$OS2_SHELL"; then alias find=gnufind; fi # 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'`" +topfiles="`echo ' ' *.y *.c *.h ' ' | sed 's/ / /g' | sed 's/ embedvar\.h\|embed\.h\|perlapi\.h\|\(globals\|perlapi\)\.c / /g'`" subdirs="`find ./* -maxdepth 0 -type d`" subdirfiles="`find $subdirs -name '*.[cy]' -print | sort`" subdirfiles1="`find $subdirs -name '*.[hH]' -print | sort`" @@ -74,10 +74,37 @@ perl -w014pe 'if (s/^( .* PERLVAR A?I? # 1: TAG group }' TAGS.tmp > TAGS.tm1 && mv TAGS.tm1 TAGS.tmp +# Now remove these Perl_, add empty- and perl_-flavors: +perl -w014pe 'if (s/^(Perl_ # 1: First group + (\w+) \( # 2: Stripped name + \x7F # End of description + ) # End of description + (\d+,\d+\n) # 3: TAGS Trail + /$1$3$1$2\x01$3$1perl_$2\x01$3/mgx) { # Repeat, add empty and perl_ flavors + $chars = chomp; + s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e; + $_ .= ("\f" x $chars); + }' TAGS.tmp > TAGS.tm1 && mv TAGS.tm1 TAGS.tmp + +# Now remove these S_, add empty-flavor: +perl -w014pe 'if (s/^(S_ # 1: First group + (\w+) \( # 2: Stripped name + \x7F # End of description + ) # End of description + (\d+,\d+\n) # 3: TAGS Trail + /$1$3$1$2\x01$3/mgx) { # Repeat, add empty_ flavor + $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 embedvar.h objXSUB.h objpp.h +etags -o TAGS.tmp -a globals.c embedvar.h perlapi.c perlapi.h +# The above processes created a lot of descriptions with an +# an explicitly specified tag. Such descriptions have higher +# precedence than descriptions without an explicitely specified tag. +# To restore the justice, make all the descriptions explicit. perl -w014pe 'if (s/^( [^\n\x7F\x01]*\b # 1: TAG group (\w+) # 2: word [^\w\x7F\x01\n]* # Most anything