#33 Macro definitions field

open
None
5
2007-06-24
2005-12-16
Dustin Voss
No

The signature field provides a function signature; I
think a macro definition field would be useful to show
what a particular macro is defined as.

I use Doxygen to create API documentation and ASpell to
spell-check it. Since most function names aren't
English words, ASpell would give spelling errors on
everything, but I use ctags to add function names etc.
to the dictionary. However, this list does not
currently include macro definitions. If ctags could
include macro definitions in the tags file, that would
fix this last problem.

I would have liked to try implementing this in a
private version of ctags, but I can't figure out how it
reads macros at all!

Discussion

  • Elliott Hughes
    Elliott Hughes
    2007-06-24

    Logged In: YES
    user_id=1127237
    Originator: NO

    i'm not sure i understand. to check spelling, you'd need the name of the macro, not its definition. and the tags file already contains macro names.

    can you give an example of what you mean?

     
  • Elliott Hughes
    Elliott Hughes
    2007-06-24

    • assigned_to: nobody --> elliotth
     
  • Dustin Voss
    Dustin Voss
    2007-06-25

    Logged In: YES
    user_id=1406069
    Originator: YES

    Yes, in this use case, I am trying to eliminate false positives. When Doxygen creates documentation for a macro, it prints the definition of the macro in the HTML. The spell-checker scans the HTML, and sees the macro definition; the definition won't be valid English, so it gets flagged as a mis-spelling. If the tag files contained macro definitions as well as names, I could extract them and tell the spell-checker to ignore them, thus removing most remaining false positives.

    Other use cases where this facility could be handy is in code completion, where the IDE could suggest an already-defined macro in place of a constant, or a table of entities, for use in some internal code documentation system.