From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#11165: 24.0.95; c-indent-new-comment-line bug or feature? Date: Tue, 15 May 2012 16:50:39 +0000 Message-ID: <20120515165038.GB20152@acm.acm> References: <20120417105348.GA3429@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1337100865 17651 80.91.229.3 (15 May 2012 16:54:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 May 2012 16:54:25 +0000 (UTC) Cc: 11165@debbugs.gnu.org To: Leo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 15 18:54:24 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SUL0u-0007uT-AF for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 May 2012 18:54:20 +0200 Original-Received: from localhost ([::1]:49078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUL0t-0001Cc-Q9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 May 2012 12:54:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUL0m-0001Au-6D for bug-gnu-emacs@gnu.org; Tue, 15 May 2012 12:54:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUL0f-0006Sg-UN for bug-gnu-emacs@gnu.org; Tue, 15 May 2012 12:54:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUL0Y-0006RP-Ct; Tue, 15 May 2012 12:53:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SUL0c-0007xQ-NF; Tue, 15 May 2012 12:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 15 May 2012 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11165 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 11165-submit@debbugs.gnu.org id=B11165.133710078930528 (code B ref 11165); Tue, 15 May 2012 16:54:02 +0000 Original-Received: (at 11165) by debbugs.gnu.org; 15 May 2012 16:53:09 +0000 Original-Received: from localhost ([127.0.0.1]:56320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUKzk-0007wK-Lz for submit@debbugs.gnu.org; Tue, 15 May 2012 12:53:08 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:37013 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUKzi-0007wD-St for 11165@debbugs.gnu.org; Tue, 15 May 2012 12:53:08 -0400 Original-Received: (qmail 76125 invoked by uid 3782); 15 May 2012 16:53:00 -0000 Original-Received: from acm.muc.de (pD951B081.dip.t-dialin.net [217.81.176.129]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 15 May 2012 18:52:57 +0200 Original-Received: (qmail 20844 invoked by uid 1000); 15 May 2012 16:50:39 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60039 Archived-At: Hello, Leo. On Tue, Apr 17, 2012 at 09:57:52PM +0800, Leo wrote: > On 2012-04-17 18:53 +0800, Alan Mackenzie wrote: > > I think you've missed out some steps here. When I do exactly that, I do > > M-x c-mode on the opening splash screen (which isn't sensible), which is > > read-only, preventing step 4. > > What I tried was, instead of your step 4, creating a new buffer with C-x > > b asdf.c, then setting the mode with M-x c-mode. > Sorry for the splash screen. What you did instead is correct. > > I do indeed see point at column 2, which is correct. I think you might > > have set the offset for "c" to 4 before creating the empty C buffer. > > Indentation configuration is buffer local. > > When I then repeat the C-c C-o c 4 I then get the second line > > at offset 4, where it ought to be. > I customise "c" after entering C mode so the customisation is effective. > If you type M-j after /*, point is moved to the newline with 2 leading > spaces. Now if you type TAB, it will go to column 4. so M-j is > misbehaving i.e. it doesn't go to the right indentation. > In contrast, M-x indent-new-comment-line following /* will move point to > column 4 in the next line. This is getting confusing. I'm asking you at this point to read the chapter "Config Basics" of the CC Mode manual. About 36 lines down from the top, it explains how setq'ing/customizing CC Mode's style variables interacts with loading a buffer. I don't think this is a bug. When you've read that manual page, would you please check exactly what you've done, and whether your buffer indents as we both would like. If it still seems wrong, could you give the exact description of how to create the problem starting from emacs -Q (yes, I know this'll involve some repetition). Thanks! > Leo -- Alan Mackenzie (Nuremberg, Germany).