From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Lewis Newsgroups: gmane.emacs.help Subject: Re: java indentation Date: Wed, 13 Nov 2002 13:49:33 -0800 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037227210 21990 80.91.224.249 (13 Nov 2002 22:40:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2002 22:40:10 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18C6B3-0005iP-00 for ; Wed, 13 Nov 2002 23:40:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18C5kZ-0001fq-00; Wed, 13 Nov 2002 17:12:43 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.bredband.com!bredband!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: marge.cs.sfu.ca Original-X-Trace: quimby.gnus.org 1037224820 30406 199.60.3.71 (13 Nov 2002 22:00:20 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 13 Nov 2002 22:00:20 GMT X-Attribution: Benjamin Lewis X-Yow: I feel better about world problems now! User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) Cancel-Lock: sha1:T2ff590BrDWnHTL6yipHFHpdogg= Original-Xref: shelby.stanford.edu gnu.emacs.help:107018 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 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:3573 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3573 On Wed, 13 Nov 2002, chris danx wrote: > Hi, > > How can you change the indentation style for Java(/c++) to bsd style (via > .emacs)? For C, this worked... > > > (add-hook 'c-mode-common-hook > (function > (lambda () (c-set-style "bsd") (setq c-basic-offset 4)))) > > but I can't figure out how to get this to work for cc-mode (java uses cc > mode right?). Someone thought that should work for Java, but it > won't. Does anyone know how to do this? Try adding it to java-mode-hook instead; I do something like this and it works for me. -- Benjamin Lewis Amoebit: Amoeba/rabbit cross; it can multiply and divide at the same time.