* C Mode Comments
@ 2002-12-19 14:37 Kevin Dziulko
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Dziulko @ 2002-12-19 14:37 UTC (permalink / raw)
Does anyone know if there is a command to mark a comment, or kill a
comment in c-mode?
Thanks much.
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.416.1040309869.19936.help-gnu-emacs@gnu.org>]
[parent not found: <qlcy96m58g4.fsf@nymfe33.fi.muni.cz>]
* Re: C Mode Comments
[not found] <qlcy96m58g4.fsf@nymfe33.fi.muni.cz>
@ 2002-12-30 13:57 ` Kevin Dziulko
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Dziulko @ 2002-12-30 13:57 UTC (permalink / raw)
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.705.1041256662.19936.help-gnu-emacs@gnu.org>]
* Re: C Mode Comments
[not found] <mailman.705.1041256662.19936.help-gnu-emacs@gnu.org>
@ 2002-12-30 16:35 ` Kai Großjohann
0 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2002-12-30 16:35 UTC (permalink / raw)
Kevin Dziulko <dziulko@klaatu.canisius.edu> writes:
> 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.
It might work to say C-u M-;.
You could try to search for a file newcomment.el, it might have been
posted to gnu.emacs.sources and this version might work with your
Emacs. Or it might not. Maybe it's easier to just upgrade your
Emacs. This is very easy to do, if you have enough space in your
home dir, say.
--
Ambibibentists unite!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-12-30 16:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-19 14:37 C Mode Comments Kevin Dziulko
[not found] <mailman.416.1040309869.19936.help-gnu-emacs@gnu.org>
2002-12-19 22:22 ` Zero Void
[not found] <qlcy96m58g4.fsf@nymfe33.fi.muni.cz>
2002-12-30 13:57 ` Kevin Dziulko
[not found] <mailman.705.1041256662.19936.help-gnu-emacs@gnu.org>
2002-12-30 16:35 ` Kai Großjohann
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).