GNU bug report logs - #25157
26.0.50; whitespace-cleanup does not remove single trailing empty line anymore

Previous Next

Package: emacs;

Reported by: Mark Karpov <markkarpov <at> openmailbox.org>

Date: Sat, 10 Dec 2016 14:43:02 UTC

Severity: normal

Tags: confirmed, fixed

Found in version 26.0.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #10 received at control <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Mark Karpov <markkarpov <at> openmailbox.org>
Cc: Reuben Thomas <rrt <at> sc3d.org>, 25157 <at> debbugs.gnu.org
Subject: Re: bug#25157: 26.0.50;
 whitespace-cleanup does not remove single trailing empty line anymore
Date: Mon, 19 Dec 2016 23:36:15 -0500
tags 25157 confirmed
quit

Mark Karpov <markkarpov <at> 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?




This bug report was last modified 8 years and 202 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.