From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: J Richardson Newsgroups: gmane.emacs.help Subject: Re: Java mode indention Date: 31 Jul 2003 15:43:20 -0400 Organization: IBM Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <84brvaiq2i.fsf@slowfox.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1059680719 11736 80.91.224.249 (31 Jul 2003 19:45:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2003 19:45:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 31 21:45:17 2003 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 19iJMM-00032z-00 for ; Thu, 31 Jul 2003 21:45:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19iJMW-0003hI-41 for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Jul 2003 15:45:20 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19iJM8-0003TN-EL for help-gnu-emacs@gnu.org; Thu, 31 Jul 2003 15:44:56 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19iJLv-0002X3-6z for help-gnu-emacs@gnu.org; Thu, 31 Jul 2003 15:44:44 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19iJLp-00026K-Ro for help-gnu-emacs@gnu.org; Thu, 31 Jul 2003 15:44:38 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19iJLV-00030G-00 for ; Thu, 31 Jul 2003 21:44:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19iJLS-0002zn-00 for ; Thu, 31 Jul 2003 21:44:14 +0200 Original-Lines: 55 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:11515 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11515 kai.grossjohann@gmx.net (Kai Großjohann) writes: > J Richardson writes: > > > I'd like it to use the base offset of the beginning of the statement > > instead. > > I've done this for the case where the open paren is the last thing on > the line. This way, I get the following: > > f(a, > b); > f( > a, > b); > > I did it my running (c-set-offset 'arglist-intro '+) from > java-mode-hook: > > (defun my-java-indent () > (c-set-offset ...)) > (add-hook 'java-mode-hook 'my-java-indent) I have that... it only works for one set of parentheses though. I don't like what it does if you add another one. I'm not sure what terminology to use. It goes from the start of the method call instead of the start of the whole statement. My offset is set to 4, and I have (c-set-offset 'arglist-intro '+), so: a_method(another_method(foo, bar)); ^ it adds the extra offset of 4 from here when I'd prefer this: a_method(another_method(foo, bar)); ^ I want it to add it from here If there is only one parenthesis then the two cases are the same. I've been living with it for a while, and your recent question about indentation reminded me about it :-) At one point it did what I wanted, but that was at my old job and I don't remember which version of Emacs it was. Either the default behavior changed or there was something in my .emacs there that I forgot to bring forward sometime. I've taken out my customizations to make sure it isn't something I've added that did it. Thanks, Jen