Subject: Re: bug#4828: 23.1.50; c-newline-and-indent and indent-line-function

From: Alan Mackenzie <[email-masked]>
Date: Sun, 22 Nov 2009 08:22:50 +0000

Hi, Lennart!

On Sat, Nov 21, 2009 at 03:09:08PM +0100, Lennart Borgman wrote:
> On Fri, Oct 30, 2009 at 2:08 AM, Stefan Monnier
> <[email-masked]> wrote:
> >> c-newline-and-indent calls indent-according-to-mode to get indentation
> > [...]
> >> I do not know how to solve this problem, but perhaps is it possible that
> >> c-newline-and-indent instead calls indent-line-function?

> > Why would that help?  indent-according-to-mode doesn't do much more than
> > call indent-line-function.

> Eh, sorry.

> Looking at the code in c-electric-semi&comma I think it is better to
> change the call to (c-indent-line) currently on line 938 in cc-cmds.el
> to (funcall indent-line-function). That will fix the problem I think.

> 	    (if c-syntactic-indentation
> 		;;(c-indent-line)
>                 (funcall indent-line-function)
>               )

> Would that be the right fix Alan?

I reckon so; it looks like a proper fix, not a workaround.  But if you
could comment it something like:

                 (funcall indent-line-function) ; Call indirectly for mumamo

, the chance of it being "cleaned up" at a later date would be
considerably diminished.	

If you want to commit this change, it's fine as far as I'm concerned.

-- 
Alan Mackenzie (Nuremberg, Germany).