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: Colin S. Miller
Subject: Re: I cannot find how to comment a block
Date: Sun, 09 Apr 2006 22:01:46 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20051002)

volunteers@gmail.com wrote:
Hi,
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.

Vol.


Volunteers,

`comment-region' is an interactive compiled Lisp function
  -- loaded from 
"/home/mohura/packages/build-area/xemacs21-21.4.17/lisp/simple.elc"
(comment-region START END &optional ARG)

Documentation:
Comment or uncomment each line in the region.
With just C-u prefix arg, uncomment each line in region.
Numeric prefix arg ARG means use ARG comment characters.
If ARG is negative, delete that many comment characters instead.
Comments are terminated on each line, even for syntax in which newline does
not end the comment.  Blank lines do not get comments.

It's not bound to a key by default.

BTW,
C-h a  can be helpful to find functionality if you can guess
part of the name of the function.

HTH,
Colin S. Miller


--
Replace the obvious in my email address with the first three letters of the 
hostname to reply.


reply via email to

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