[Top][All Lists]

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

bug#25529: diagnosis and one approach to a fix

From: Stefan Monnier
Subject: bug#25529: diagnosis and one approach to a fix
Date: Fri, 10 Feb 2017 23:22:23 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Stefan> Removing the `end` argument is fundamentally wrong.  It's OK to play it
Stefan> fast-and-loose and ignore that argument, but the function *should* keep
Stefan> the buffer untouched after `end`.

> I thought it was ok because the region is always extended to the end of
> the line, and I think this regexp can't span lines.

Why come up with complex semantic arguments when a simple `max` ensures
the right behavior regardless of other assumptions?

> If this change is still needed, should the final goto-char also be
> treated this way?

It's not needed there, no: the important part is to avoid modifying the
buffer after `end` (although, as I said, it's not terribly bad if you
do it: you'd only get burned by it in very unusual cases).


reply via email to

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