GNU bug report logs - #4828
23.1.50; c-newline-and-indent and indent-line-function

Previous Next

Packages: emacs, cc-mode;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Thu, 29 Oct 2009 14:10:05 UTC

Severity: minor

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 4828 <at> debbugs.gnu.org
Subject: bug#4828: 23.1.50; c-newline-and-indent and indent-line-function
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
> <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

, 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).



This bug report was last modified 9 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.