3218
|
1 #! /bin/sh |
|
2 |
|
3 # Generate a TAGS file from a set of Octave .m files for use with Emacs. |
|
4 # |
|
5 # Run as '$ otags' in the given Octave directory to generate a |
|
6 # TAGS file. If you want to include another directory, add a line |
|
7 # prior to the "*.m" line containing something like |
|
8 # `--include=/path/to/other/directory/TAGS" \'. |
|
9 |
|
10 # Tags are generated for function names and for global variables. For |
|
11 # global variables it doesn't work for more than one line global |
|
12 # variables. :-( |
|
13 |
|
14 # Tags are also created for lines of the form '###key foobar' so that |
|
15 # you can jump to this specific place just by typing `M-. foobar'. |
|
16 # Note that tags are not generated for scripts so that you have to add |
|
17 # a line by yourself of the form `###key <script-name>' if you want to |
|
18 # jump to it. :-( |
|
19 |
3219
|
20 # Author: Mario Storti <mstorti@minerva.unl.edu.ar> |
|
21 |
3218
|
22 etags --lang=none \ |
4151
|
23 --regex='/[ \t]*function.*=[ \t]*\([^ \t()]*\)[ \t]*(/\1/' \ |
|
24 --regex='/[ \t]*function.*=[ \t]*\([^ \t()]*\)[ \t]*$/\1/' \ |
|
25 --regex='/[ \t]*function[ \t]*\([^ \t()]*\)[ \t]*(/\1/' \ |
|
26 --regex='/[ \t]*function[ \t]*\([^ \t()]*\)[ \t]*$/\1/' \ |
3218
|
27 --regex='/###key \(.*\)/\1/' \ |
|
28 --regex='/[ \t]*global[ \t].*/' \ |
|
29 *.m |