Mercurial > hg > octave-nkf
view emacs/octave-tags @ 7156:77de8319c337 ss-2-9-17
[project @ 2007-11-10 06:16:59 by jwe]
author | jwe |
---|---|
date | Sat, 10 Nov 2007 06:17:00 +0000 |
parents | 4270ded9ddc6 |
children |
line wrap: on
line source
#! /bin/sh # # Copyright (C) 1998, 2002, 2003, 2006, 2007 Mario Storti # # This file is part of Octave. # # Octave is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # # Octave is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with Octave; see the file COPYING. If not, see # <http://www.gnu.org/licenses/>. # Author: Mario Storti <mstorti@minerva.unl.edu.ar> # Generate a TAGS file from a set of Octave .m files for use with Emacs. # # Run as '$ octave-tags' in the given Octave directory to generate a # TAGS file. If you want to include another directory, add a line # prior to the "*.m" line containing something like # `--include=/path/to/other/directory/TAGS" \'. # Tags are generated for function names and for global variables. For # global variables it doesn't work for more than one line global # variables. :-( # Tags are also created for lines of the form '###key foobar' so that # you can jump to this specific place just by typing `M-. foobar'. # Note that tags are not generated for scripts so that you have to add # a line by yourself of the form `###key <script-name>' if you want to # jump to it. :-( etags --lang=none \ --regex='/[ \t]*function.*=[ \t]*\([^ \t()]*\)[ \t]*(/\1/' \ --regex='/[ \t]*function.*=[ \t]*\([^ \t()]*\)[ \t]*$/\1/' \ --regex='/[ \t]*function[ \t]*\([^ \t()]*\)[ \t]*(/\1/' \ --regex='/[ \t]*function[ \t]*\([^ \t()]*\)[ \t]*$/\1/' \ --regex='/###key \(.*\)/\1/' \ --regex='/[ \t]*global[ \t].*/' \ *.m