Hi,

I have written Emacs macros to switch back and forth between Wt's
style of indentation and mine.

There is one problem. The macros left-justifies comments, which
destroys indentation in "\code" blocks. My solution is as follows:

      Use a left-margin character, that will be aligned with the
      left-margin asterisks in other parts of the comment. I have
      used ^A ('\001')

      Filter out that character using this in Doxyfile

          INPUT_FILTER = "perl -p -e 's/\001//'"

Comments look like this

      * As an example usage, consider the implementation of WRun(), which
      * starts the server until a Ctrl-C is pressed or a termination signal
      * has been received:
      *
      * \code
      ^A    int WRun(int argc, char *argv[], ApplicationCreator 
createApplication)
      ^A    {
      ^A      try {
      ^A         // use argv[0] as the application name to match a suitable 
entry

but the ^A does not appear in the generated dcumentation, as it was
filtered out before doxygen looked at the source file.

Any character or sequence of characters can be used, as long as it
is possible to write a regular expression that is highly unlikely
to filter out anything that it should not. E.g. ':::' could be used
with

          INPUT_FILTER = "perl -p -e 's/^\s*::://'"

I don't suggest doing this for all existing \code blocks, but would
it be OK to do so when needed?

As documentation is not built when the library is built from source, this
will not affect developers who do not have perl on their system. (I'm not
user that perl is available on Windows.)

If there is any interest, I can make the Emacs macros available.

Regards
/Lars Hamrén

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to