From: "Loris Bennett" <loris.bennett@fu-berlin.de>
To: help-gnu-emacs@gnu.org
Subject: Re: delete-trailing-whitespace behavior change?
Date: Wed, 12 Dec 2018 16:40:50 +0100 [thread overview]
Message-ID: <87a7lawy65.fsf@hornfels.zedat.fu-berlin.de> (raw)
In-Reply-To: mailman.5630.1544617495.1284.help-gnu-emacs@gnu.org
Skip Montanaro <skip.montanaro@gmail.com> 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.
Cheers,
Loris
--
This signature is currently under construction.
next parent reply other threads:[~2018-12-12 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5630.1544617495.1284.help-gnu-emacs@gnu.org>
2018-12-12 15:40 ` Loris Bennett [this message]
2018-12-12 17:34 ` delete-trailing-whitespace behavior change? Skip Montanaro
2018-12-12 21:26 ` Javier
2018-12-13 3:51 ` Skip Montanaro
2018-12-12 12:24 Skip Montanaro
2018-12-12 17:47 ` Kaushal Modi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7lawy65.fsf@hornfels.zedat.fu-berlin.de \
--to=loris.bennett@fu-berlin.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.