[gnu.emacs] Tags support for C++

eb@LUCID.COM (Eric Benson) (05/31/89)

Has anyone modified etags to do something more useful with C++ files?

mosurm@mntgfx.mentor.com (Mosur Mohan) (06/07/89)

In article <8905302354.AA02876@blacksox> eb@LUCID.COM (Eric Benson) writes:

> Path: mntgfx!qiclab!percival!tektronix!zephyr!uunet!tut.cis.ohio-state.edu!LUCID.COM!eb
> From: eb@LUCID.COM (Eric Benson)
> Date: 30 May 89 23:54:23 GMT
> 
> Has anyone modified etags to do something more useful with C++ files?

I sort of started on it, and stalled on .h files.  You're welcome to
what I have done so far, which is basically temporary hack-work to
treat C++ comments (//) correctly, and to recognise a -p switch (which
indicates that .c & .h files are to be handled as C++ rather than C code).
Please send me mail if you're willing to risk my code (I'd rather not
post it yet, I only wrote it 2 days back!)

I also modified the find-tag function to only look for exact matches
(it searches for \<tag\> in order to do that).

Handling of .h files is a lot more painful, and I haven't yet worked
out how to deal with tagging classes and member function declarations
- whether to tag them in some distinctive way so that one could ask
for either the .h file declaration or the .c file implementation.  Any
ideas?  Better still, does anyone understand etags.c and its handling
of .h files?
-- 
-- Mohan.   {mosurm@pdx.mentor.com, uunet!mntgfx!mosurm}
            {Mosur Mohan, Mentor Graphics, Beaverton, OR}
------------------------------------------------------------
"Cogito ergo sum"  ==>  "I think, therefore I add."