From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: C indentation customization Date: Fri, 24 Jul 2015 22:25:27 -0700 (PDT) Message-ID: <3e7addc2-8703-4eff-a647-010b9040bcef@googlegroups.com> References: <9975de97-78b1-4f7f-939e-f3cecd5128f7@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1437802224 8945 80.91.229.3 (25 Jul 2015 05:30:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jul 2015 05:30:24 +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 07:30:19 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 1ZIs2L-00032D-G3 for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Jul 2015 07:30:17 +0200 Original-Received: from localhost ([::1]:47235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIs2K-0002sf-FG for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Jul 2015 01:30:16 -0400 X-Received: by 10.182.24.70 with SMTP id s6mr17540691obf.42.1437801928230; Fri, 24 Jul 2015 22:25:28 -0700 (PDT) X-Received: by 10.50.50.167 with SMTP id d7mr35621igo.10.1437801928190; Fri, 24 Jul 2015 22:25:28 -0700 (PDT) Original-Path: usenet.stanford.edu!f3no2539999igg.0!news-out.google.com!o13ni1519igw.0!nntp.google.com!f3no2539993igg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <9975de97-78b1-4f7f-939e-f3cecd5128f7@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=61.2.48.202; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 61.2.48.202 User-Agent: G2/1.0 Injection-Date: Sat, 25 Jul 2015 05:25:28 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:213689 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:105975 Archived-At: 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 ...