Your question is how to use C-c C-c
to uncomment the region.
@AaronHarris answered your question about using a negative prefix arg.
But I think you misread the doc of comment-region
(which CC mode binds to C-c C-
). It does not uncomment the region. It deletes a certain number of comment characters.
To uncomment the region you use C-u
- a plain prefix arg (no explicit number) to uncomment the region. C-h f comment-region
says:
comment-region is an interactive compiled Lisp function in
newcomment.el
.
It is bound to menu-bar edit region comment-region.
(comment-region BEG END &optional ARG)
Comment or uncomment each line in the region.
With just C-u
prefix arg, uncomment each line in region BEG .. END
.
Numeric prefix ARG
means use ARG
comment characters.
If ARG
is negative, delete that many comment characters instead.
The strings used as comment starts are built from comment-start
and comment-padding
; the strings used as comment ends are built
from comment-end
and comment-padding
.
By default, the comment-start
markers are inserted at the
current indentation of the region, and comments are terminated on
each line (even for syntaxes in which newline does not end the
comment and blank lines do not get comments). This can be
changed with comment-style
.
So the answer is to use C-u C-c C-c
.
And FWIW, comment-region
is much better than M-;
(comment-dwim
) for commenting and uncommenting the region. It lets you nest and unnest comment blocks any number of levels.