Doxygen-style comments #9

linuxfever opened this Issue Nov 7, 2012 · 7 comments


None yet

2 participants


Hello and thanks for this useful package. I have made my own comment style for C++ like this:

“ box123456 “

The problem I have found is that in order to move the box, say a bit to the right, I have to move each line individually. This does not happen with the other comment styles, where the box is moved as a whole. Any ideas what is wrong? Thanks in advance!


I don't understand what your style looks like. Can you give some more examples?



Apologies for not explaining properly. I am trying to create a custom C++ comment box style for use with Doxygen. In case you are not familiar with Doxygen, in a nutshell, it creates documentation for a piece of code using the comments found in the code itself. However, only comments that are enclosed in 'special' box styles are included from Doxygen, the rest are ignored. One of those 'special' boxes is the one I presented in my first comment.

At the moment, I have edited the pre-existing style that appears on line 357 of the latest rebox2 revision. It now looks like this:

(35 535
" box123456 "

(Notice that I use '/' instead of '?' since I am only interested in C++ code.)

When I use the above style in action, it shows up nicely. However, rebox is not treating it as a 'unified' box. For example, when I try to move the whole box one column to the right, I have to press the spacebar for each line of the comment box. On the other hand, for the pre-existing box styles, pressing the spacebar in any line of the box moves the whole box to the right.

I hope I am making more sense now?


I've added a doxygen style according to the documentation here: and fixed some issues related to that.

Note that you said you're writing C++, but the comment style you used is C style. That implies you've set comment-start and comment-end appropriately?

C comment box styles are 2xx.


Hi, thanks for incorporating doxygen style comments. I customised the rebox-style-loop variable to include the style, it now looks like this

defcustom rebox-style-loop '(21 25 27 246)

When I try commenting C code, then things work wonderfully. When making a comment line longer, I can see the box lines growing too. Also, when moving the box to the right, rebox treats it as a 'unified' box.

This, however, does not seem to happen when editing C++ code. The box is still created around the comment, but does not grow if I make my comment line longer. Also, it still does not treat the box as 'unified'.

Am I doing something wrong? It may have to do something with the comment-start and comment-end you mention in your last post, but I am not sure what they mean. I appreciate your help!

@linuxfever linuxfever closed this Nov 10, 2012
@linuxfever linuxfever reopened this Nov 10, 2012

Sorry, I accidentally closed the issue. I have now reopened it.

@lewang lewang pushed a commit that referenced this issue Nov 11, 2012
Le Wang update installation instruction
- use Doxygen in c++-mode


Thanks, this works great. I am not good with elisp, so would not be able to write my-c++-setup on my own. Thanks for your help!

@linuxfever linuxfever closed this Nov 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment