From d1e113ee60a0750acbbc0da569f7cc1bab88f11c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Tue, 21 Oct 2014 11:59:11 +0200 Subject: [PATCH] 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 --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 369fbf71923..48c1a9b15d6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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 -- 2.39.2