[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4828: 23.1.50; c-newline-and-indent and indent-line-function
From: |
Alan Mackenzie |
Subject: |
bug#4828: 23.1.50; c-newline-and-indent and indent-line-function |
Date: |
Sun, 22 Nov 2009 08:22:50 +0000 |
User-agent: |
Mutt/1.5.9i |
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@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
, 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).