help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I cannot find how to comment a block


From: Stefan Monnier
Subject: Re: I cannot find how to comment a block
Date: Mon, 10 Apr 2006 01:16:30 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> I know this is a basic question but I just didn't find the solution: in
> cc-mode (I was writing C++ codes), how can I comment a block? I tried
> 'M-;' and it just adds comments behind that line.  What I want is to
> comment this line or several lines (add // in front of every line, or
> /* ... */) . Thanks.

Just use M-; (yes, it does work for that purpose).
But make sure the region is active and highlighted: i.e. turn on
transient-mark-mode.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]