|
Re: C Mode Comments: msg#00947emacs.help
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@xxxxxxxxxxxxxxxxxxx> 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 > |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Autoinsert: 00947, Chmouel Boudjnah |
|---|---|
| Next by Date: | Re: setting site-wide default colors,fonts,... in Emacs: 00947, Richard Stallman |
| Previous by Thread: | Re: C Mode Commentsi: 00947, Zero Void |
| Next by Thread: | Re: C Mode Comments: 00947, Kai Großjohann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |