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

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

bug#24745: 25.1.50; whitespace.el: fix beginning/end of buffer checks


From: Reuben Thomas
Subject: bug#24745: 25.1.50; whitespace.el: fix beginning/end of buffer checks
Date: Fri, 21 Oct 2016 15:42:58 +0100

[Apologies for not responding earlier; I had to dig this out of my spam trap.]

On 20 October 2016 at 23:43, Dmitry Gutov <dgutov@yandex.ru> wrote:
On 20.10.2016 15:32, Reuben Thomas wrote:
whitespace-report-region currently (Emacs 25.1, and identically in
master) fails correctly to detect whitespace at the start and end of the
buffer.

Could you please describe the problematic behavior exactly?

​The problem is that whitespace-report-region does not apply the tests whitespace-empty-at-{bob,eob}-regexp specifically to the start and end of the buffer. Since the tests were (intentionally) not previously anchored to the start/end of the buffer, this meant they could pass at other, arbitrary, places in the buffer, and incorrect report that there were blank lines at the start/end of the buffer when there weren't.

The new tests are specifically anchored, and I made a minor change elsewhere to avoid appending a now-unnecessary anchor.

--

reply via email to

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