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#15124: 24.2; comment indentation functions are messed up Date: Wed, 21 Aug 2013 21:03:39 +0000 Message-ID: <20130821210339.GA3790@acm.acm> References: <874nan5j6u.fsf%stlman@poczta.fm> <49zjse4yza.fsf@fencepost.gnu.org> <521129C1.8020107@poczta.fm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1377119128 10635 80.91.229.3 (21 Aug 2013 21:05:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Aug 2013 21:05:28 +0000 (UTC) Cc: 15124@debbugs.gnu.org To: Lukasz Stelmach Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 21 23:05:29 2013 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 1VCFar-0002e7-1K for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Aug 2013 23:05:29 +0200 Original-Received: from localhost ([::1]:56746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCFaq-0001Vq-KQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Aug 2013 17:05:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCFag-0001U3-IU for bug-gnu-emacs@gnu.org; Wed, 21 Aug 2013 17:05:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCFaZ-0002p8-8s for bug-gnu-emacs@gnu.org; Wed, 21 Aug 2013 17:05:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCFaR-0002cZ-BC; Wed, 21 Aug 2013 17:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VCFaQ-0006Gw-Jd; Wed, 21 Aug 2013 17:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 21 Aug 2013 21:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15124 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 15124-submit@debbugs.gnu.org id=B15124.137711909724098 (code B ref 15124); Wed, 21 Aug 2013 21:05:02 +0000 Original-Received: (at 15124) by debbugs.gnu.org; 21 Aug 2013 21:04:57 +0000 Original-Received: from localhost ([127.0.0.1]:45777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCFaK-0006Gb-ON for submit@debbugs.gnu.org; Wed, 21 Aug 2013 17:04:57 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:16686 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCFaH-0006GM-H9 for 15124@debbugs.gnu.org; Wed, 21 Aug 2013 17:04:54 -0400 Original-Received: (qmail 81075 invoked by uid 3782); 21 Aug 2013 21:04:51 -0000 Original-Received: from acm.muc.de (p5492C77E.dip0.t-ipconnect.de [84.146.199.126]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 21 Aug 2013 23:04:50 +0200 Original-Received: (qmail 11231 invoked by uid 1000); 21 Aug 2013 21:03:39 -0000 Content-Disposition: inline In-Reply-To: <521129C1.8020107@poczta.fm> 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.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:77591 Archived-At: Hello, Lukasz On Sun, Aug 18, 2013 at 10:08:33PM +0200, Lukasz Stelmach wrote: > W dniu 18.08.2013 20:48, Glenn Morris pisze: > > Łukasz Stelmach wrote: > >> I've got some problems with making my Emacs insert " *" at the > >> beginning of a new line of a comment block in cc-mode. > >> I have found what looks like a little mess-up. > >> 1. M-j is bound to indent-new-comment-line (an alias for > >> comment-indent-new-line). Comments at the beginning of the > >> newcomment.el files say support for consulting > >> c-comment-line-break-function is yet to be developed. > >> 2. cc-mode augments (cc-cmds.el) indent-new-comment-line to use > >> c-indent-new-comment-line unless comment-line-break-function is bound. > > Which in practice means it does not do this except in very old Emacs > > versions that are no longer relevant. > >> 3. This variable is defined and set in simple.el and used in > >> default-indent-new-line. This however is is not bound to any key so > >> setting it to c-indent-new-comment-line in a mode hook won't help. > > Sorry, I can't understand what the bug is supposed to be. I've fired up "emacs-24.2 -Q", created a new buffer "asdf.c", M-x c-mode. > Contrary to what the cc-mode info (4.4 Filling and Line breaking) says, > M-j does not call c-indent-new-comment-line. This makes it impossible, > like I wrote at the beginnig, to get " *" inserted automatically when > pressing M-j to end a line when editing a comment. The result is: When I type in the text below, typing M-j where indicated, I get the desired " *" on the next line. When I do C-h c M-j, I get told that M-j is bound to `c-indent-new-comment-line'. Questions: 1: Are you certain your buffer was in a CC Mode? What did you do that put the buffer into the CC Mode (e.g. C-x C-f foo.c would do it)? Please report the actual keystrokes you use. 2: What did you do to determine that M-j was bound to `indent-new-comment-line'? Are you sure you were in the CC Mode buffer when you did this? 3: (If 1: and 2: don't solve the problem), would you please dump out your CC Mode configuration by C-c C-b and post it here. Please also tell us about anything else in your .emacs which might be relevant to the problem. > /* > * Pressing M-j at the end of this line gives > only a bad indent at the beginnig of this one. Instead of > * the proper prefix which in this case should be " * ". > */ Thanks! > -- > Było mi bardzo miło. Czwarta pospolita klęska, [...] > >Łukasz< Już nie katolicka lecz złodziejska. (c)PP -- Alan Mackenzie (Nuremberg, Germany).