all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Hide/show support for C++ triple-slash Doxygen markup?
@ 2010-05-29 18:09 John Yates
  2010-05-29 20:00 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: John Yates @ 2010-05-29 18:09 UTC (permalink / raw)
  To: help-gnu-emacs

I use Doxygen's triple-slash syntax to markup my C++ code.  There are
two important cases which arise:

1) block markup comments which are the sole element on the line and may
   or may not begin flush left; e.g.

class foo
/// A one sentence brief description of foo.  The elaboration can
/// continue on for many lines.
{
    ...
};

void foo::bar
    /// A one sentence brief description of bar.  The elaboration can
    /// continue on for many lines.
    () const
{
    ...
}


2) trailing markup comments which always follow some number of C++
   tokens earlier on the first line but may still spill over onto
   subsequent lines; e.g.

class foo
{
    int  _var1;                 ///< A brief description of _var1.
    int  _var2;                 ///< A brief description of _var2
                                ///< requiring additional lines.
}

void foo::bar
    ( int arg1                  ///< A brief description of arg1.
    , int arg2                  ///< A brief description of arg2
                                ///< requiring additional lines.
    ) const
{
    ...
}


I wonder what hide/show support exists to deal with these conventions.
The most important cases are the block markup comments.  Ideally I would
like to be able to eliminate these altogether, meaning that I would
prefer not to waste a line simply to indicate presence of a folded
block markup comment.  Instead I would like a fringe marker, a la

    http://www.emacswiki.org/emacs/hideshowvis.el

/john





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Hide/show support for C++ triple-slash Doxygen markup?
  2010-05-29 18:09 Hide/show support for C++ triple-slash Doxygen markup? John Yates
@ 2010-05-29 20:00 ` Thien-Thi Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Thien-Thi Nguyen @ 2010-05-29 20:00 UTC (permalink / raw)
  To: John Yates; +Cc: help-gnu-emacs

() John Yates <john@yates-sheets.org>
() Sat, 29 May 2010 18:09:23 +0000 (UTC)

   1) block markup comments which are the sole element on the line and may
      or may not begin flush left; e.g.

I just tried this in a buffer (copy/paste, M-x c++-mode RET, the latter
makes hideshow commands available under my setup) and they work with
‘hs-toggle-hiding’ on the comment line.  The same command in the function
body (between curly braces), does not function in the same way, however.
(It hides from the line following the function name to close curly brace.)

   2) trailing markup comments which always follow some number of C++
      tokens earlier on the first line but may still spill over onto
      subsequent lines; e.g.

I tried this, too, but nothing happened with ‘hs-toggle-hiding’.

Caveat: My hideshow.el and related customizations have probably drifted from 
the more widely available (included w/ emacs) versions.  Not to mention my
Emacs is from 2008-04-29 and other stick-in-the-mud factors....  YMWUV.

   I wonder what hide/show support exists to deal with these conventions.
   The most important cases are the block markup comments.  Ideally I would
   like to be able to eliminate these altogether, meaning that I would
   prefer not to waste a line simply to indicate presence of a folded
   block markup comment.

You can customize hideshow a bit, perhaps to not adjust the beginning of
the hidden region so much.  I'd be interested in hearing how things go.

thi



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-29 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-29 18:09 Hide/show support for C++ triple-slash Doxygen markup? John Yates
2010-05-29 20:00 ` Thien-Thi Nguyen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.