From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Chuck Bernard Newsgroups: gmane.emacs.help Subject: Re: how to set c-offsets-alist Date: Fri, 21 Jun 2002 10:27:11 -0700 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <3D1361EE.26B80501@lvision.com> References: <20020621132626.18534.qmail@web20308.mail.yahoo.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1024680697 13433 127.0.0.1 (21 Jun 2002 17:31:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2002 17:31:37 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17LSG0-0003UY-00 for ; Fri, 21 Jun 2002 19:31:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17LSEa-000569-00; Fri, 21 Jun 2002 13:30:08 -0400 Original-Received: from lvision8.logicvision.com ([209.1.81.20] helo=cujo.lvision.com) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17LSBl-0004ZF-00 for ; Fri, 21 Jun 2002 13:27:13 -0400 Original-Received: from dogbert.lvision.com (root@localhost) by cujo.lvision.com (8.9.3+Sun/8.9.1) with ESMTP id KAA16220; Fri, 21 Jun 2002 10:27:12 -0700 (PDT) Original-Received: from lvision.com (localhost [127.0.0.1]) by dogbert.lvision.com (8.9.3+Sun/8.9.1) with ESMTP id KAA26195; Fri, 21 Jun 2002 10:27:11 -0700 (PDT) X-Mailer: Mozilla 4.73 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en Original-To: Subhakar K S , emacs list Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:507 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:507 Subhakar K S wrote: > How do I set the values for various c/c++ syntactic > symbols using "c-offsets-alist". > > I want to set this values in my ~/.emacs file. > > Any example peice of ~/.emacs will be helpful for > me to copy paste. > > thanks, > Subhakar. Here is my example from my .emacs file. Read the comment to learn more about customizing the values. //Chuck ;If you go to a line in a c++ file and type C-c C-o it will tell you the name ;of the syntactic symbol to use in c-set-offset (or below in the list). (setq c-style-alist (append '(("ETX" (c-basic-offset . 2) (c-comment-only-line-offset . 0) (c-hanging-braces-alist (substatement-open before after)) (c-offsets-alist (topmost-intro . 0) (topmost-intro-cont . 0) (substatement . +) (substatement-open . 0) (case-label . +) (friend . -) (access-label . -) (inclass . 4) (inline-open . 0)))) c-style-alist)) (setq c-default-style "ETX") > > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs