]> git.eshelyaron.com Git - emacs.git/commitdiff
Stop `fixup-whitespace' adding trailing whitespace (Bug#18783)
authorNiels Möller <nisse@lysator.liu.se>
Tue, 21 Oct 2014 09:59:11 +0000 (11:59 +0200)
committerNoam Postavsky <npostavs@gmail.com>
Fri, 31 Mar 2017 01:05:08 +0000 (21:05 -0400)
* 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

index 369fbf7192316c883a88929a07e44868f9012436..48c1a9b15d62f0689ab5c2cdd99b9cb42a4161ee 100644 (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