bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Monnier
Subject: bug#15767: closed (Re: bug#15767: 24.3; [patch] electric-indent-mode bug)
Date: Tue, 05 Nov 2013 10:44:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]