From: Teemu Likonen <tlikonen@iki.fi>
To: help-gnu-emacs@gnu.org
Subject: Re: about auto indentation
Date: Sat, 07 Aug 2010 16:50:01 +0300 [thread overview]
Message-ID: <87eieasfau.fsf@mithlond.arda> (raw)
In-Reply-To: 20100807151110.5a60f768@bir-tawil.nul
* 2010-08-07 15:11 (+0200), fgr@bir-tawil.nul.invalid wrote:
> 2010-08-07 15:08 +0300, Teemu Likonen wrote:
>> I guess you want command c-indent-new-comment-line which, by default,
>> is bound to M-j key in c-mode.
>
> That command does an indentation but doesn't add any "*" character.
Did you use M-j at the end of a comment line? The command should add a
newline, indent and then add a comment character. That's what it does in
my Emacs. Command's description:
M-j runs the command c-indent-new-comment-line, which is an
interactive compiled Lisp function in `cc-cmds.el'.
It is bound to M-j, C-M-j.
(c-indent-new-comment-line &optional SOFT ALLOW-AUTO-FILL)
Break line at point and indent, continuing comment or macro if
within one. If inside a comment and `comment-multi-line' is non-nil,
the indentation and line prefix are preserved (see the
`c-comment-prefix-regexp' and `c-block-comment-prefix' variables for
details). If inside a single line comment and `comment-multi-line'
is nil, a new comment of the same type is started on the next line
and indented as appropriate for comments. If inside a macro, a line
continuation backslash is inserted and aligned as appropriate, and
the new line is indented according to `c-syntactic-indentation'.
If a fill prefix is specified, it overrides all the above.
next prev parent reply other threads:[~2010-08-07 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-07 11:22 about auto indentation fgr
2010-08-07 12:08 ` Teemu Likonen
[not found] ` <20100807151110.5a60f768@bir-tawil.nul>
2010-08-07 13:50 ` Teemu Likonen [this message]
2010-08-07 14:57 ` fgr
2010-08-07 15:20 ` fgr
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eieasfau.fsf@mithlond.arda \
--to=tlikonen@iki.fi \
--cc=help-gnu-emacs@gnu.org \
/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.
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.