From: Kevin Dziulko <dziulko@klaatu.canisius.edu>
Subject: Re: C Mode Comments
Date: Mon, 30 Dec 2002 08:57:30 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.44.0212300852430.29500-100000@klaatu.canisius.edu> (raw)
In-Reply-To: <qlcy96m58g4.fsf@nymfe33.fi.muni.cz>
I am running GNU Emacs 20.2.3. M-; does not run comment-dwim, but runs
indent-for-comment.
What I am looking for is a command that would have the effect of killing
an entire comment. For example, given:
int x; /* this is a comment */
Only "int x;" would remain on this line of code.
Thanks.
On 19 Dec 2002, Jiri Pejchal wrote:
> Kevin Dziulko <dziulko@klaatu.canisius.edu> writes:
>
> > Does anyone know if there is a command to mark a comment, or kill a
> > comment in c-mode?
> >
> > Thanks much.
>
> Try M-; which runs the command comment-dwim.
>
> Mark a region (with M-h or whatever) then M-;
> to comment region.
>
> Do the same one more time to uncomment the region.
>
> Call the comment command you want (Do What I Mean).
> If the region is active and `transient-mark-mode' is on, call
> `comment-region' (unless it only consists of comments, in which
> case it calls `uncomment-region').
> Else, if the current line is empty, insert a comment and indent it.
> Else if a prefix ARG is specified, call `comment-kill'.
> Else, call `comment-indent'.
>
> Jiri Pejchal
>
next parent reply other threads:[~2002-12-30 13:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <qlcy96m58g4.fsf@nymfe33.fi.muni.cz>
2002-12-30 13:57 ` Kevin Dziulko [this message]
[not found] <mailman.705.1041256662.19936.help-gnu-emacs@gnu.org>
2002-12-30 16:35 ` C Mode Comments Kai Großjohann
[not found] <mailman.416.1040309869.19936.help-gnu-emacs@gnu.org>
2002-12-19 22:22 ` Zero Void
2002-12-19 14:37 Kevin Dziulko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0212300852430.29500-100000@klaatu.canisius.edu \
--to=dziulko@klaatu.canisius.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).