On Tue, Oct 27, 2015 at 8:07 AM, Andreas Röhler <andreas.roehler@easy-emacs.de> wrote:

> First fix looks cleaner.

Shorter, indeed, though it does more work, and inside a loop. I really have no preference.

> Such a basic routine should preserve matches by its own virtue.

Are you talking about delete-trailing-whitespace or skip-syntax-backward?

Anyway, I've always thought that functions should preserve the match data, but I was told that doing so is a (relatively) expensive operation, and functions that use match data should be the ones to make sure that it is valid when they need it.

    J