From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ERDI Gergo Newsgroups: gmane.emacs.help Subject: Re: cc-mode: Reverting to the 'dumber' indentation of nested function calls, as seen in Emacs20 Date: Thu, 13 Nov 2003 20:33:21 +0100 (CET) Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1068752092 12152 80.91.224.253 (13 Nov 2003 19:34:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2003 19:34:52 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 13 20:34:49 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AKNEv-0001E7-00 for ; Thu, 13 Nov 2003 20:34:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AKOCK-0007Wa-Ey for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Nov 2003 15:36:12 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AKOA3-0006Un-Sx for help-gnu-emacs@gnu.org; Thu, 13 Nov 2003 15:33:51 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AKO9U-0005nJ-7a for help-gnu-emacs@gnu.org; Thu, 13 Nov 2003 15:33:46 -0500 Original-Received: from [195.228.240.91] (helo=darmachakra.axelero.hu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AKO8k-0004yx-C6 for help-gnu-emacs@gnu.org; Thu, 13 Nov 2003 15:32:30 -0500 Original-Received: from localhost (localhost-02 [127.0.2.1]) by darmachakra.axelero.hu (8.12.10/8.12.10) with SMTP id hADJV1S4030066 for ; Thu, 13 Nov 2003 20:31:01 +0100 (CET) Original-Received: from fe03.axelero.hu [127.0.2.1] via SMTP gateway by darmachakra.axelero.hu [195.228.240.91]; id A0756172837 at Thu, 13 Nov 2003 20:31:01 +0100 Original-Received: from ds9.cactus (ktv32-209-72.catv-pool.axelero.hu [62.201.72.209]) by fe03.axelero.hu (8.12.10/8.12.10) with ESMTP id hADJV0ig029982 for ; Thu, 13 Nov 2003 20:31:00 +0100 (CET) Original-Received: from ds9.cactus ([10.0.0.1] ident=cactus) by ds9.cactus with esmtp (Exim 3.36 #1 (Debian)) id 1AKNDV-00021i-00 for ; Thu, 13 Nov 2003 20:33:21 +0100 X-Sender: cactus@ds9.cactus Original-To: help-gnu-emacs@gnu.org In-Reply-To: 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:14151 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14151 On Mon, 10 Nov 2003, ERDI Gergo wrote: > [Please CC replies to cactus@cactus.rulez.org] > However, with Emacs21, here's what I get (again, '#' denotes double-spaces > from c-basic-offset. '$' denotes spaces inserted by an unknown smart > offset-calculator that I wasn't able to hunt down) 1 > ##long_function_name (bar ( 2 > $$$$$$$$$$$$$$$$$$$$$$##baz (0))); so I dug into the sources and the documentation and here's what I got: the $ part comes from the column 'bar' starts in, in the following way: when line 2 is inspected, the syntactic analysis returns the position of the 'b' of 'bar' in line 1. The indentation engine then takes the column number of that position and uses it as the basis when calculating the start of line 2. So what actually happens here is that Emacs20's cc-mode engine got the start of the expression wrong since it found the beginning 'l' of line 1 to be the start of the expression containing the "baz" call. However, even now that I know what happens, I still don't know what I can do about this. I'd still like to make this a special case and make the indentation of arguments of nested function calls start from the outmost function call and not the innermost. Can anyone help me now that we have that more information? Thanks, Gergo -- .--= ULLA! =---------------------. `We are not here to give users what \ http://cactus.rulez.org \ they want' -- RMS, at GUADEC 2001 `---= cactus@cactus.rulez.org =---' Jesus saves, Allah protects, and Buddha enlightens. Cthulhu thinks you taste good with ketchup.