help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about auto indentation


From: Teemu Likonen
Subject: Re: about auto indentation
Date: Wed, 08 Dec 2010 15:23:41 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux)

* 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]