Stop `fixup-whitespace' adding trailing whitespace (Bug#18783)

* lisp/simple.el (fixup-whitespace): Insert no spaces if point is at
end of line after deleting horizontal whitespace.

Copyright-paperwork-exempt: yes
This commit is contained in:
Niels Möller 2014-10-21 11:59:11 +02:00 committed by Noam Postavsky
parent 7a8ae233d1
commit d1e113ee60

View file

@ -833,7 +833,7 @@ Leave one space or none, according to the context."
(interactive "*")
(save-excursion
(delete-horizontal-space)
(if (or (looking-at "^\\|\\s)")
(if (or (looking-at "^\\|$\\|\\s)")
(save-excursion (forward-char -1)
(looking-at "$\\|\\s(\\|\\s'")))
nil