Subject: Re: bug#15767: closed (Re: bug#15767: 24.3; [patch] electric-indent-mode bug)

From: Stefan Monnier <[email-masked]>
Date: Tue, 05 Nov 2013 10:44:59 -0500

> Well, the problem I see is that you left the call to line-beginning-position
> where it was in the original call.  At that point, point may be
> on a different line than it started on, so it’s actually getting information
> about the wrong line.  It’s possible that your patch somehow makes
> everything work out, but leaving the call to line-beginning-position where
> it is seems at best fragile to me.

On the contrary, moving the call like you did was wrong, IMO.  The test
against line-beginning-position is meant to check if pos is on
a previous line, in which case we also need to reindent that previous
line, whereas with your patch it reduces to just check if pos is at
(bolp) which is not as interesting (tho it will often work as well for
the newline case).

        Stefan