From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: Modify indention for C/C++ Date: Wed, 11 Jun 2014 16:42:45 +0300 Message-ID: <87oaxzsgtm.fsf@mithlond.arda> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1402494227 1230 80.91.229.3 (11 Jun 2014 13:43:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Jun 2014 13:43:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Florian Lindner Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 11 15:43:40 2014 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 1WuioV-0007Ep-UN for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jun 2014 15:43:40 +0200 Original-Received: from localhost ([::1]:46531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuioV-00045R-En for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jun 2014 09:43:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wuio2-0003qu-Oc for help-gnu-emacs@gnu.org; Wed, 11 Jun 2014 09:43:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wuinv-0006Xm-2E for help-gnu-emacs@gnu.org; Wed, 11 Jun 2014 09:43:10 -0400 Original-Received: from mta-out1.inet.fi ([62.71.2.198]:43754 helo=kirsi1.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wuinu-0006Kz-Or for help-gnu-emacs@gnu.org; Wed, 11 Jun 2014 09:43:03 -0400 Original-Received: from mithlond.arda (84.251.136.59) by kirsi1.inet.fi (8.5.140.03) id 534D34B5046B05AC; Wed, 11 Jun 2014 16:42:55 +0300 Original-Received: from dtw by mithlond.arda with local (Exim 4.80) (envelope-from ) id 1Wuinm-0002db-Gt; Wed, 11 Jun 2014 16:42:54 +0300 In-Reply-To: (Florian Lindner's message of "Wed, 11 Jun 2014 15:24:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 62.71.2.198 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:98145 Archived-At: --=-=-= Content-Type: text/plain Florian Lindner [2014-06-11 15:24:34 +02:00] wrote: > what is the canonical way to modify indention for certain keywords? > I've found numerous ways in the internets. I want to change the linux > style so, that is does not do indention for namespaces. > > (c-add-style "linux" > '( > (c-basic-offset . 2) > (c-offset-alist . ( > (namespace-open . 0) > (namespace-close . 0) > (innamespace . 0) > )) > )) How about this? (c-add-style "my-linux" '("linux" (c-basic-offset . 2) (c-offset-alist (namespace-open . 0) (namespace-close . 0) (innamespace . 0)))) This adds "my-linux" style, so the original is not overwritten. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJTmFzVAAoJEHGdadMkU5RQMmQP/RaPg6OlZUNR6h/nddUN0zy7 oIp4F1j89ggmgvlyitvCY6UzvaFoXnI27Fs0yYhnUSYBbiMon54GX1FRD///+Fdq 4PolWLplhx4A3Qf0WqmcORve0aTQMeSBJpkGCy3bBXMeW/3mV9sZXNCt4KiCmW7o 9HrU6Hgn2hFiK0WsOhmLmjCNc79PAR8zK3NScCPi/RtkIx+FFHzt2U+MPdDh6iXI vcNipySnjYTmWpquHB9Np71BMSCmiRu761SSqLYBVy5jZUYe2pdymIEk/rEkDDtH yX3K6Reqrgj1SlxZ4OrjEMt6EAjVxCPWGjBORkfC6lWRyubWSNiNKjN213UeaPDC 2XnlQk/h394P5V7iGaBSDXJXz8rOMfvQc6hW//2/aO6rK07KkQSHWdybjb3eVzk+ Znm1h1CjEPv5LOcim8vuRK5YT7h0AsNa9ExwHbW3HLvmyg2z6A86QWw/aShPH/OR rDvp61B6OUWKtylrAs2q3JtiVXgFpztJxU9Itdx45KUR3YpT2NgoDgoDnnhlnOQ5 NMNpC4h0ou2vBo3oQBdOQOp9rgtqnyx5xsCisaj359ucVk2OzyB5vYwOuqH33A+C joo8zJdMMGy1ylEcbZZ7YOvBHuUy5Ez3Q5mWNeHTasfCM1V4DXPqAdZgDFRCxfWJ nmbkon294zrGEfKFINg4 =nH2W -----END PGP SIGNATURE----- --=-=-=--