emacs-devel
[Top][All Lists]
Advanced

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

Re: ctags/etags: rc file?


From: Francesco Potortì
Subject: Re: ctags/etags: rc file?
Date: Thu, 20 Nov 2014 13:07:06 +0100

>Would it be possible for ctags/etags to read a simple .etags (or
>something) file that contains the command line arguments?  The reason
>for it is that often projects have a bunch of default arguments that
>are being passed to etags, which are not just regexps and it is
>annoying to keep track of them at times.
>
>If .etags (one argument per line) contains,
>
>  --language=none
>  --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/'
>  --regex='/###key \(.*\)/\1/'
>  --regex='/[ \t]*global[ \t].*/'
>  *.m
>
>And then issuing "etags -Z" (or some other sensible short option) it
>would be equivalent to running,
>
>  etags --language=none --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ 
> \t]*(/\1/' --regex='/###key \(.*\)/\1/' --regex='/[ \t]*global[ \t].*/' *.m

You can put regular expressions for etags in a file.  Have a look at the
info file of Emacs (node Etags Regexps) or the output of `etags --help'
(look for REGEXFILE).

Note that if you call etags from a Makefile it is probably more clear
and less prone to error to just put the --regex arguments on the
command line in makefile itself.



reply via email to

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