annotate emacs/octave-tags @ 7961:a5d1e27ee1f4 ss-3-1-51

3.1.51 snapshot
author John W. Eaton <jwe@octave.org>
date Tue, 22 Jul 2008 11:40:48 -0400
parents 4270ded9ddc6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6071
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
1 #! /bin/sh
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
2 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
3 # Copyright (C) 1998, 2002, 2003, 2006, 2007 Mario Storti
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
4 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
5 # This file is part of Octave.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
6 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
7 # Octave is free software; you can redistribute it and/or modify it
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
8 # under the terms of the GNU General Public License as published by the
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
9 # Free Software Foundation; either version 3 of the License, or (at
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
10 # your option) any later version.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
11 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
12 # Octave is distributed in the hope that it will be useful, but WITHOUT
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
15 # for more details.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
16 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
17 # You should have received a copy of the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
18 # along with Octave; see the file COPYING. If not, see
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
19 # <http://www.gnu.org/licenses/>.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
20
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6071
diff changeset
21 # Author: Mario Storti <mstorti@minerva.unl.edu.ar>
6071
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
22
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
23 # Generate a TAGS file from a set of Octave .m files for use with Emacs.
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
24 #
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
25 # Run as '$ octave-tags' in the given Octave directory to generate a
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
26 # TAGS file. If you want to include another directory, add a line
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
27 # prior to the "*.m" line containing something like
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
28 # `--include=/path/to/other/directory/TAGS" \'.
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
29
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
30 # Tags are generated for function names and for global variables. For
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
31 # global variables it doesn't work for more than one line global
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
32 # variables. :-(
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
33
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
34 # Tags are also created for lines of the form '###key foobar' so that
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
35 # you can jump to this specific place just by typing `M-. foobar'.
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
36 # Note that tags are not generated for scripts so that you have to add
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
37 # a line by yourself of the form `###key <script-name>' if you want to
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
38 # jump to it. :-(
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
39
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
40 etags --lang=none \
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
41 --regex='/[ \t]*function.*=[ \t]*\([^ \t()]*\)[ \t]*(/\1/' \
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
42 --regex='/[ \t]*function.*=[ \t]*\([^ \t()]*\)[ \t]*$/\1/' \
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
43 --regex='/[ \t]*function[ \t]*\([^ \t()]*\)[ \t]*(/\1/' \
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
44 --regex='/[ \t]*function[ \t]*\([^ \t()]*\)[ \t]*$/\1/' \
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
45 --regex='/###key \(.*\)/\1/' \
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
46 --regex='/[ \t]*global[ \t].*/' \
950d8cb39617 [project @ 2006-10-23 19:30:28 by jwe]
jwe
parents:
diff changeset
47 *.m