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

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

bug#25157: 26.0.50; whitespace-cleanup does not remove single trailing e


From: npostavs
Subject: bug#25157: 26.0.50; whitespace-cleanup does not remove single trailing empty line anymore
Date: Mon, 19 Dec 2016 23:36:15 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

tags 25157 confirmed
quit

Mark Karpov <markkarpov@openmailbox.org> writes:

> The ‘whitespace-cleanup’ command does not remove single trailing empty
> line anymore.

This seems to have been caused by the fix for #24745.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24745#5 has
 
-(defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]+\\)"
+(defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]+\\)\\'"

which is what I would expect, but
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24745#11 says

   First, I revised my previous patch, which had an error in the new
   version of whitespace-empty-at-eob-regexp.

and has

-(defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]+\\)"
+(defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]*\\(\n\\{2,\\}\\|[ 
\t]+\\)\\)\\'"

I don't quite understand why this more complicated expression is
necessary.  Reuben, can you explain?





reply via email to

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