From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: about auto indentation Date: Sat, 07 Aug 2010 16:50:01 +0300 Organization: A noiseless patient Spider Message-ID: <87eieasfau.fsf@mithlond.arda> References: <20100807132238.5f45b605@bir-tawil.nul> <87k4o2sk0r.fsf@mithlond.arda> <20100807151110.5a60f768@bir-tawil.nul> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291859793 10728 80.91.229.12 (9 Dec 2010 01:56:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 01:56:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 02:56:29 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQVkD-0006hZ-Ct for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 02:56:29 +0100 Original-Received: from localhost ([127.0.0.1]:42388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQVkC-0000W9-VS for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 20:56:29 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!news.buerger.net!newsfeed.datemas.de!eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Injection-Date: Sat, 7 Aug 2010 13:50:02 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="TcTTtsh3Iz4M1vNcTNIcFQ"; logging-data="31982"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18J5V3XR+6XAwCI5Lf8U+1XqB17TcUqmyk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux) Cancel-Lock: sha1:/vbWjphl+73bbKPECQ6U7rTASk8= sha1:nPe2npwkoa0lDfEyHSEJMTfFBaI= Original-Xref: usenet.stanford.edu gnu.emacs.help:180491 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76426 Archived-At: * 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.