[Top][All Lists]

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

Re: delete-trailing-whitespace behavior change?

From: Loris Bennett
Subject: Re: delete-trailing-whitespace behavior change?
Date: Wed, 12 Dec 2018 16:40:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Skip Montanaro <> writes:

> I've defined this hook in ~/.emacs for ages (a decade or so, I suspect):
> (add-hook 'before-save-hook 'delete-trailing-whitespace)
> Recently, I've noticed that the last newline of files seems to be deleted.
> Not always, but pretty frequently. I'm running 25.2.2 at home and 25.3.2 at
> work. I think I switched from 24 to 25 in the past few months. I can't seem
> to quickly lay my hands on Emacs 24 without going through a
> download/install cycle, but I wonder if delete-trailing-whitespace might
> have changed between 24 and 25?
> Any insight would be appreciated...

I have this setting too and my Emacs 25.1.1 deletes all empty newlines
at the end of a file, which it is what it says on the tin:

  If this command acts on the entire buffer (i.e. if called
  interactively with the mark inactive, or called from Lisp with END
  nil), it also deletes all trailing lines at the end of the buffer if
  the variable ‘delete-trailing-lines’ is non-nil.

The 24.5.1 tins say the same thing.



This signature is currently under construction.

reply via email to

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