From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ludwig, Mark" Newsgroups: gmane.emacs.help Subject: RE: Auto-indentation Date: Sat, 21 Apr 2012 22:38:17 +0000 Message-ID: References: <4F915D2A.1040607@gmail.com> <20120421083901.GA3186@mark-laptop> <4F92AEE4.4050204@gmail.com> <4F92BB6C.7020001@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1335108813 20338 80.91.229.3 (22 Apr 2012 15:33:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 22 Apr 2012 15:33:33 +0000 (UTC) To: Richard H Lee , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 22 17:33:33 2012 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 1SLyn5-0000XY-GW for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Apr 2012 17:33:31 +0200 Original-Received: from localhost ([::1]:45685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLyn4-0002VW-LF for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Apr 2012 11:33:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLymz-0002UY-NL for help-gnu-emacs@gnu.org; Sun, 22 Apr 2012 11:33:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLymy-0001ec-3l for help-gnu-emacs@gnu.org; Sun, 22 Apr 2012 11:33:25 -0400 Original-Received: from usslmhub002.ugs.com ([134.244.32.85]:29619 helo=ugs.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLymx-0001e1-VO for help-gnu-emacs@gnu.org; Sun, 22 Apr 2012 11:33:24 -0400 Original-Received: from USSLMMBX002.net.plm.eds.com (161.134.138.62) by USSLMHUB002.net.plm.eds.com (134.244.32.85) with Microsoft SMTP Server (TLS) id 14.1.323.3; Sun, 22 Apr 2012 10:31:36 -0500 Original-Received: from USSLMMBX003.net.plm.eds.com ([169.254.2.89]) by USSLMMBX002.net.plm.eds.com ([169.254.1.7]) with mapi id 14.01.0323.003; Sat, 21 Apr 2012 17:38:18 -0500 Thread-Topic: Auto-indentation Thread-Index: AQHNHxG3OjBsXt87qECEjAhnIHYoiZalShYAgABIaQCAAA7wAIAAPO+A In-Reply-To: <4F92BB6C.7020001@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [146.122.225.199] X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP2+, XP SP1+ (seldom 98) X-Received-From: 134.244.32.85 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:84595 Archived-At: > From: Richard H Lee > Sent: Saturday, April 21, 2012 8:52 AM > To: help-gnu-emacs@gnu.org > Subject: Re: Auto-indentation >=20 > On 21/04/12 13:58, Richard H Lee wrote: > > c-offsets-alist to nil >=20 > I still had problems. >=20 > c-syntactic-indentation did the trick If this is all you need to do, great. To fit existing code I maintain, I f= ound I needed to extensively customize c-offsets-list, but also others such= as c-basic-offset and c-comment-only-line-offset; the easiest way to do it= all together is to create your own "style" and add it using c-add-style. (I did this so I can impress my colleagues by positioning point in front of= the opening brace of an entire C function or Java method and press C-M-q.) Cheers, Mark