emacs-devel
[Top][All Lists]
Advanced

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

Re: xref-find-matches and stuff


From: Francesco Potortì
Subject: Re: xref-find-matches and stuff
Date: Fri, 08 May 2015 15:02:42 +0200

Vitalie Spinu:
>>     - There are plenty of languages that don't have tags support and
>>       nobody would care to add it.
>
>For people with aversion to contributing patches upstream, ctags also 
>supports specifying necessary regexps on the command line: 
>https://gist.github.com/wereHamster/1299204

Etags provides this feature too.  From etags --help:

-r REGEXP, --regex=REGEXP or address@hidden
        Make a tag for each line matching a regular expression pattern
        in the following files.  {LANGUAGE}REGEXP uses REGEXP for LANGUAGE
        files only.  REGEXFILE is a file containing one REGEXP per line.
        REGEXP takes the form /TAGREGEXP/TAGNAME/MODS, where TAGNAME/ is
        optional.  The TAGREGEXP pattern is anchored (as if preceded by ^).
        If TAGNAME/ is present, the tags created are named.
        For example Tcl named tags can be created with:
          --regex="/proc[ \t]+\([^ \t]+\)/\1/.".
        MODS are optional one-letter modifiers: `i' means to ignore case,
        `m' means to allow multi-line matches, `s' implies `m' and
        causes dot to match any character, including newline.

-R, --no-regex
        Don't create tags from regexps for the following files.

Note that new languages cannot be defined on the command line, even if
this is a problem only for tag files containing tags for mixed language
sources.  And anyway adding this capability to etags would be almost
trivial.



reply via email to

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