bug#4828: 23.1.50; c-newline-and-indent and indent-line-function
Alan Mackenzie <acm <at> muc.de>
2009-11-22 08:22:50 GMT
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
> <monnier <at> iro.umontreal.ca> 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
(Continue reading)