From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: C indentation customization Date: Sat, 25 Jul 2015 10:38:23 +0300 Message-ID: <83si8c1yc0.fsf@gnu.org> References: <9975de97-78b1-4f7f-939e-f3cecd5128f7@googlegroups.com> <3e7addc2-8703-4eff-a647-010b9040bcef@googlegroups.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1437810013 16393 80.91.229.3 (25 Jul 2015 07:40:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jul 2015 07:40:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 25 09:40:03 2015 Return-path: Envelope-to: geh-help-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 1ZIu3u-0001hN-79 for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Jul 2015 09:40:02 +0200 Original-Received: from localhost ([::1]:47427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIu3t-0004RH-Lj for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Jul 2015 03:40:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIu3k-0004R9-KR for help-gnu-emacs@gnu.org; Sat, 25 Jul 2015 03:39:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIu3a-0002Sm-8k for help-gnu-emacs@gnu.org; Sat, 25 Jul 2015 03:39:52 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:46828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIu3a-0002SX-17 for help-gnu-emacs@gnu.org; Sat, 25 Jul 2015 03:39:42 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NS100J008UB2G00@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Sat, 25 Jul 2015 10:38:22 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NS100I9297YR3B0@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Sat, 25 Jul 2015 10:38:22 +0300 (IDT) In-reply-to: <3e7addc2-8703-4eff-a647-010b9040bcef@googlegroups.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105977 Archived-At: > Date: Fri, 24 Jul 2015 22:25:27 -0700 (PDT) > From: Rusi > > On Friday, July 24, 2015 at 8:23:11 PM UTC+5:30, Rusi wrote: > > On Friday, July 24, 2015 at 7:54:41 PM UTC+5:30, Rusi wrote: > > > http://emacswiki.org/emacs/IndentingC > > > seems to say that doing > > > > > > (setq c-default-style "linux" > > > c-basic-offset 4) > > > > > > will indent like this: > > > > > > if(foo) > > > { > > > bar++; > > > } > > > > > > ie '{' is not indented, contents is 4 space indented. > > > > > > Likewise setting to bsd > > > as described https://en.wikipedia.org/wiki/Indent_style#Allman_style > > > seems to say that the '{' wont be indented > > > > > > None of these work; ie the '{' is always indented. > > > > Evidently restarting emacs makes it work > > [ie these bindings need to be in effect before CC-mode is loaded(?)] > > Should not the early-binding of these deserve a place somewhere (prominent) > in the docs? > Something like: > - For permanent settings do ... > - For temporary trying out do ... Did you read the node "Config Basics" in the CC Mode manual? It seems to discuss precisely these issues.