unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: ERDI Gergo <cactus@cactus.rulez.org>
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)	[thread overview]
Message-ID: <Pine.LNX.4.10.10311132028480.7778-100000@ds9.cactus> (raw)
In-Reply-To: <Pine.LNX.4.10.10311101953570.2478-100000@ds9.cactus>

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.

  reply	other threads:[~2003-11-13 19:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-10 19:00 cc-mode: Reverting to the 'dumber' indentation of nested function calls, as seen in Emacs20 ERDI Gergo
2003-11-13 19:33 ` ERDI Gergo [this message]
     [not found] <mailman.112.1068494680.2005.help-gnu-emacs@gnu.org>
2003-11-10 23:08 ` Kevin Rodgers
2003-11-11 16:30   ` ERDI Gergo
2003-12-07 17:01 ` Kai Grossjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.10311132028480.7778-100000@ds9.cactus \
    --to=cactus@cactus.rulez.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).