From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Robert Figueiredo" Newsgroups: gmane.emacs.help Subject: c-mode post-line-break indentation Date: Tue, 31 Oct 2006 15:47:15 -0800 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0806594689==" X-Trace: sea.gmane.org 1162402523 1505 80.91.229.2 (1 Nov 2006 17:35:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Nov 2006 17:35:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 01 18:35:20 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GfJzP-0006eW-Mi for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Nov 2006 18:35:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GfJzP-0004t9-70 for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Nov 2006 12:34:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gf3KD-0004vS-Vp for help-gnu-emacs@gnu.org; Tue, 31 Oct 2006 18:47:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gf3K9-0004rw-EV for help-gnu-emacs@gnu.org; Tue, 31 Oct 2006 18:47:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gf3K9-0004rt-Bj for help-gnu-emacs@gnu.org; Tue, 31 Oct 2006 18:47:17 -0500 Original-Received: from [64.233.182.190] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gf3K9-0007oD-CH for help-gnu-emacs@gnu.org; Tue, 31 Oct 2006 18:47:17 -0500 Original-Received: by nf-out-0910.google.com with SMTP id q29so491107nfc for ; Tue, 31 Oct 2006 15:47:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=jKz+YJTL6J+mIalvEDCwClhoEWtB7gMLN67cF3Sda+wAI8++tbh/oYS9l7wL8YeT4QBYc4AmBUPTMxRsVP/icP8o5o4fqOZlasaUOoJgZa56Z8VPVsSJFTXIKvc7OJHcDanHSfu3jZqXWKXuDlf3hqinOpjkx69GzubEvTNsHIY= Original-Received: by 10.48.202.11 with SMTP id z11mr1362167nff.1162338435462; Tue, 31 Oct 2006 15:47:15 -0800 (PST) Original-Received: by 10.48.47.12 with HTTP; Tue, 31 Oct 2006 15:47:15 -0800 (PST) Original-To: help-gnu-emacs@gnu.org X-Mailman-Approved-At: Wed, 01 Nov 2006 12:34:45 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38463 Archived-At: --===============0806594689== Content-Type: multipart/alternative; boundary="----=_Part_99355_21295327.1162338435431" ------=_Part_99355_21295327.1162338435431 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, The behavior I want in c-mode (or java-mode) is a basic-offset of 2, but a further indent of 4 if an expression is broken across lines. For example, LongClassName lcn = new LongClassName(someLongArguments); I can not figure out how to do this :c\ It seems like the only option is writing a function to parse this structure and tab it accordingly, and adding that to c-offsets-alist, but that seems like a ton of work for something my IntelliJ-using coworkers get for free. Any ideas? Thanks, Rob Figueiredo ------=_Part_99355_21295327.1162338435431 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello,
The behavior I want in c-mode (or java-mode) is a basic-offset of 2, but a further indent of 4 if an expression is broken across lines.  For example,

LongClassName lcn =
    new LongClassName(someLongArguments);


I can not figure out how to do this :c\
It seems like the only option is writing a function to parse this structure and tab it accordingly, and adding that to c-offsets-alist, but that seems like a ton of work for something my IntelliJ-using coworkers get for free.

Any ideas?

Thanks,
Rob Figueiredo
------=_Part_99355_21295327.1162338435431-- --===============0806594689== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0806594689==--