summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-10-04 22:38:23 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-10-06 03:49:03 +0000
commit3625ddea48ab606617fb55b4c1655a4e43db960a (patch)
tree474ad4b72c0171dc643f807fe70500238d3c6308 /emacs
parenteb07465ebe1238598e948058857ec948c6697f86 (diff)
downloadperl-3625ddea48ab606617fb55b4c1655a4e43db960a.tar.gz
emacs/ptags inprovements
Message-Id: <199810050638.CAA07792@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@1928
Diffstat (limited to 'emacs')
-rwxr-xr-xemacs/ptags18
1 files changed, 13 insertions, 5 deletions
diff --git a/emacs/ptags b/emacs/ptags
index c672612237..a0481922b6 100755
--- a/emacs/ptags
+++ b/emacs/ptags
@@ -22,7 +22,9 @@ if test ! -z "$OS2_SHELL"; then alias find=gnufind; fi
# 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 )`"
+subdirs="`find ./* -maxdepth 0 -type d`"
+subdirfiles="`find $subdirs -name '*.[cy]' -print | sort`"
+subdirfiles1="`find $subdirs -name '*.[hH]' -print | sort`"
xsfiles="`find . -name '*.xs' -print | sort`"
# etags -d : process defines too (default now)
@@ -51,6 +53,11 @@ rm -f TAGS.tmp TAGS.tm2
etags -o TAGS.tmp \
-l none -r '/#\(\$[a-zA-Z_0-9]+\|define\)[ \t]+\([a-zA-Z_0-9]+\)/\2/' \
config_h.SH
+# Process lines like this: Mcc (Loc.U):
+etags -o TAGS.tmp -a \
+ -l none -r '/^\([a-zA-Z_0-9]+\)[ \t]+(/\$\1/' \
+ -r '/^\([a-zA-Z_0-9]+\)[ \t]+(/\1/' Porting/Glossary
+
etags -o TAGS.tmp -a "$@" $topfiles
# Now add these PL_:
@@ -59,7 +66,7 @@ perl -w014pe 'if (s/^( .* PERLVAR I? # 1: TAG group
.* #
\x7F # End of description
)
- ( .* \x1 ) # 2: Exact group
+ ( .* \x01 ) # 2: Exact group
/${1}PL_$2/mgx) { # Add PL_
$chars = chomp;
s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e;
@@ -71,13 +78,13 @@ perl -w014pe 'if (s/^( .* PERLVAR I? # 1: TAG group
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
-perl -w014pe 'if (s/^( [^\n\x7F\x1]*\b # 1: TAG group
+perl -w014pe 'if (s/^( [^\n\x7F\x01]*\b # 1: TAG group
(\w+) # 2: word
- [^\w\x7X\x1\n]* # Most anything
+ [^\w\x7F\x01\n]* # Most anything
\x7F # End of description
)
(\d+,\d+\n) # 3: TAGS Trail
- /$1$2\x1$3/mgx) { # Add specific marking
+ /$1$2\x01$3/mgx) { # Add specific marking
$chars = chomp;
s/^((\n.+,)\d+)/ $2 . (length($_) - length($1) - 1) /e;
$_ .= ("\f" x $chars);
@@ -104,6 +111,7 @@ etags -o TAGS.tmp -a -d -l c \
# $xsfiles
etags -o TAGS.tmp -a "$@" $subdirfiles
+etags -o TAGS.tmp -a "$@" $subdirfiles1
if test ! -f emacs/cperl-mode.elc ; then
( cd emacs; emacs -batch -q -no-site-file -f batch-byte-compile cperl-mode.el )