[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: etags for mfiles?

From: Mario Storti
Subject: Re: etags for mfiles?
Date: Wed, 11 Nov 1998 18:15:16 -0300

>>>>> On Wed, 11 Nov 1998 10:35:04 -0600 (CST), 
>>>>>      "John W. Eaton" <address@hidden> said:

> On 11-Nov-1998, Francesco Potorti` <address@hidden> wrote:
> | Hi, I am the maintainer of etags.
> | 

> ................. < lines snipped here > ..............

> | If I  am convinced, I  will schedule inclusion  of support for .m  files in
> | etags (don't hold your breath) and will accept code that implements that or
> | write  it myself.   Otherwise,  I'll  include Mario  Storti's  code in  the
> | examples section of the etags  manual that comes with Emacs.

> If it is OK with Mario, I'll also included it in the Octave manual.

> Thanks,

> jwe

Well,  following   this    discussion I   checked   the  regexps  more
exhaustively,  and modified  it  slightly (in  the previous version it
didn't treated well the case with several return values). Also I found
that the tags for global variables don't work. I mean that it works if
there is only one global variable in the line :-(. However I wonder if
this is important.



Mario Alberto Storti                           | Fax: (54)(42) 55.09.44 |
Centro Internacional de Metodos Computacionales| Tel: (54)(42) 55.91.75 |
  en Ingenieria - CIMEC (INTEC/CONICET-UNL)    |........................|  
INTEC, Guemes 3450 - 3000 Santa Fe, Argentina                           |
Reply: address@hidden, |

================= otags script =================================
#$Id: otags,v 1.6 1998/11/11 20:04:42 mstorti Exp mstorti $

# generates a TAGS file for a set of Octave .m files for use with
# Emacs.  Run from the command line as '$ otags' in the given octave
# directory and will 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 functions and for global variables. For
# global variables it doesn't work for more than one global variable
# per line. :-(((

# 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 be able to jump to it. 

etags --lang=none \
      --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/' \
      --regex='/###key \(.*\)/\1/' \
      --regex='/[ \t]*global\([ \t][^ \t]+\)*[ \t]\([^ \t]+\)[ \t]/\2/' \

reply via email to

[Prev in Thread] Current Thread [Next in Thread]