* Re: M-; and M-j and c-comment alignment
[not found] <mailman.7147.1385457886.10748.help-gnu-emacs@gnu.org>
@ 2013-11-26 10:52 ` Damien Wyart
2013-11-26 10:53 ` Damien Wyart
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Damien Wyart @ 2013-11-26 10:52 UTC (permalink / raw)
To: help-gnu-emacs
* Luca Ferrari <fluca1978@infinito.it> in gnu.emacs.help:
> [...]
> Is there a way to automatically open an aligned comment as the one
> I would like to have?
Does setting comment-end to "\n*/" for C/C++ mode answers the question ?
A quit test with:
(add-hook 'c-mode-common-hook
'(lambda ()
(setq comment-end "\n*/")))
did the trick for me.
--
DW
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: M-; and M-j and c-comment alignment
2013-11-26 10:52 ` M-; and M-j and c-comment alignment Damien Wyart
@ 2013-11-26 10:53 ` Damien Wyart
2013-11-26 12:52 ` Luca Ferrari
[not found] ` <mailman.7160.1385470332.10748.help-gnu-emacs@gnu.org>
2013-11-26 13:40 ` Stefan Monnier
[not found] ` <mailman.7164.1385473254.10748.help-gnu-emacs@gnu.org>
2 siblings, 2 replies; 9+ messages in thread
From: Damien Wyart @ 2013-11-26 10:53 UTC (permalink / raw)
To: help-gnu-emacs
> Does setting comment-end to "\n*/" for C/C++ mode answers the question ?
You can also have a look at doxymacs, which defines additional
comment-related commands you might find useful (even if you do not use
Doxygen at all).
--
DW
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: M-; and M-j and c-comment alignment
2013-11-26 10:53 ` Damien Wyart
@ 2013-11-26 12:52 ` Luca Ferrari
[not found] ` <mailman.7160.1385470332.10748.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Luca Ferrari @ 2013-11-26 12:52 UTC (permalink / raw)
To: Damien Wyart; +Cc: help-gnu-emacs
On Tue, Nov 26, 2013 at 11:53 AM, Damien Wyart <damien.wyart@free.fr> wrote:
>> Does setting comment-end to "\n*/" for C/C++ mode answers the question ?
>
> You can also have a look at doxymacs, which defines additional
> comment-related commands you might find useful (even if you do not use
> Doxygen at all).
Currently I've doxymacs installed, but the
doxymacs-insert-blank-multiline-comment is not strictly what I want
because:
1) it adds and extra line and an extra '*' in the beginning of the
comment (to mark it doxygen-like)
2) it requires me to use another key binding when M-; works for both
insert a new comment and comment out a region.
Thanks,
Luca
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.7160.1385470332.10748.help-gnu-emacs@gnu.org>]
* Re: M-; and M-j and c-comment alignment
2013-11-26 10:52 ` M-; and M-j and c-comment alignment Damien Wyart
2013-11-26 10:53 ` Damien Wyart
@ 2013-11-26 13:40 ` Stefan Monnier
[not found] ` <mailman.7164.1385473254.10748.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2013-11-26 13:40 UTC (permalink / raw)
To: help-gnu-emacs
> (add-hook 'c-mode-common-hook
> '(lambda ()
> (setq comment-end "\n*/")))
Running for the Useless Use of Quote Award?
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.7164.1385473254.10748.help-gnu-emacs@gnu.org>]
* M-; and M-j and c-comment alignment
@ 2013-11-26 9:24 Luca Ferrari
0 siblings, 0 replies; 9+ messages in thread
From: Luca Ferrari @ 2013-11-26 9:24 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I would like my comments to be multi-line as follows:
/*
* <here the cursor>
*/
and so a comment decorated with an empty top and bottom line. When I
press M-; emacs correctly opens the comment, and if then I hit M-j
emacs goes down one line and places the '*' for the new line, but this
makes the end of the comment on the last line:
/*
* <here the cursor> */
and so I have to manually C-j and indent the last line. Is there a way
to automatically open an aligned comment as the one I would like to
have?
Thanks,
Luca
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-11-27 7:31 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.7147.1385457886.10748.help-gnu-emacs@gnu.org>
2013-11-26 10:52 ` M-; and M-j and c-comment alignment Damien Wyart
2013-11-26 10:53 ` Damien Wyart
2013-11-26 12:52 ` Luca Ferrari
[not found] ` <mailman.7160.1385470332.10748.help-gnu-emacs@gnu.org>
2013-11-26 13:07 ` Damien Wyart
2013-11-27 7:16 ` Luca Ferrari
[not found] ` <mailman.7230.1385536609.10748.help-gnu-emacs@gnu.org>
2013-11-27 7:31 ` Damien Wyart
2013-11-26 13:40 ` Stefan Monnier
[not found] ` <mailman.7164.1385473254.10748.help-gnu-emacs@gnu.org>
2013-11-26 14:43 ` Damien Wyart
2013-11-26 9:24 Luca Ferrari
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.