From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.bugs Subject: bug#681: Wrong C++ indentation in batch mode Date: Tue, 07 Jan 2014 17:09:23 +0100 Message-ID: <87ppo3hiz0.fsf@bzg.ath.cx> References: <200808091726.22907.Vivien.Mallet@inria.fr> <87zjn8hu79.fsf@bzg.ath.cx> <87zjn7g5x7.fsf@verdandi.inria.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389111679 18771 80.91.229.3 (7 Jan 2014 16:21:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jan 2014 16:21:19 +0000 (UTC) Cc: 681@debbugs.gnu.org To: Vivien Mallet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 07 17:21:25 2014 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 1W0ZPA-0001sX-Dd for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 17:21:24 +0100 Original-Received: from localhost ([::1]:41552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0ZP9-0002kq-Nk for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 11:21:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0ZET-0000Bb-IU for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 11:10:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0ZEO-0001cZ-0m for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 11:10:21 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0ZEC-0001Pf-EX; Tue, 07 Jan 2014 11:10:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W0ZEB-0007JE-9t; Tue, 07 Jan 2014 11:10:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bastien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 07 Jan 2014 16:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 681 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 681-submit@debbugs.gnu.org id=B681.138911097328041 (code B ref 681); Tue, 07 Jan 2014 16:10:03 +0000 Original-Received: (at 681) by debbugs.gnu.org; 7 Jan 2014 16:09:33 +0000 Original-Received: from localhost ([127.0.0.1]:41175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0ZDg-0007IC-GT for submit@debbugs.gnu.org; Tue, 07 Jan 2014 11:09:33 -0500 Original-Received: from mail-we0-f178.google.com ([74.125.82.178]:53711) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0ZDd-0007I3-Te for 681@debbugs.gnu.org; Tue, 07 Jan 2014 11:09:30 -0500 Original-Received: by mail-we0-f178.google.com with SMTP id t60so332263wes.37 for <681@debbugs.gnu.org>; Tue, 07 Jan 2014 08:09:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=r4H4+DDvXQGlNn6ivfK7/ORZfDhzlRDwnPYVTOMyPRA=; b=clUl++QFz5ldSViIdGxn5wdiiP4AVJk4/iL8DI5Xcub1NrJBhwwuJQp8Qq0gCAvs0j 3UCTV2Z4vkDuy7tsiqOWmIEn5lRrrTIf+Er1ra1V6orlT3EhDsC5nt1USIepi9DmqmEL 8S903s8WLDDLINfAUoq5c06K6WTdC9Nv9qgHhfqnJBMdeZ++s3nuY/CDSIECAsNKxJIn miRFMRwF2VZZNksIQAmnVR0qIBX2BNe4gDE0ivPiELfL59XXz3IwTKn6CRbb5aSjBtSI x7xLDTUZOtJukiaJt5DgGjUbtsyxw1teiss3X+XwDpYwuN8O0PxQL6DUQBAAOoigFWpi f1kQ== X-Received: by 10.194.104.66 with SMTP id gc2mr6867585wjb.75.1389110969108; Tue, 07 Jan 2014 08:09:29 -0800 (PST) Original-Received: from bzg.localdomain (AMontsouris-651-1-93-112.w82-123.abo.wanadoo.fr. [82.123.216.112]) by mx.google.com with ESMTPSA id jw4sm45787150wjc.20.2014.01.07.08.09.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2014 08:09:27 -0800 (PST) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id CB2EA1C20717; Tue, 7 Jan 2014 17:09:23 +0100 (CET) In-Reply-To: <87zjn7g5x7.fsf@verdandi.inria.fr> (Vivien Mallet's message of "Tue, 07 Jan 2014 16:36:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:83115 Archived-At: Hi Vivien, Vivien Mallet writes: > Now, launch from command line: > \emacs -Q test.cpp --batch --eval="(defun cpp_indent () (c-set-style \"gnu\") (c++-mode) (indent-region (point-min) (point-max) ()) (save-buffer))" --eval="(cpp_indent)" > > You should get: > > template > Derived::Derived(): > Base B>() // Problem: wrong indentation in batch mode. > { > int i: > } > > In addition, it seems that "c-set-style" is not honored. It may be > "bsd", "k&r", etc. without any difference. Mhh... yes, I see now. I reopend the bug and will let someone more familiar with the code fix it. -- Bastien