<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikemacs.org/index.php?action=history&amp;feed=atom&amp;title=Trailing_Whitespace</id>
	<title>Trailing Whitespace - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikemacs.org/index.php?action=history&amp;feed=atom&amp;title=Trailing_Whitespace"/>
	<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Trailing_Whitespace&amp;action=history"/>
	<updated>2026-04-19T02:01:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wikemacs.org/index.php?title=Trailing_Whitespace&amp;diff=3174&amp;oldid=prev</id>
		<title>Francesco: Page on trailing whitespace handling</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Trailing_Whitespace&amp;diff=3174&amp;oldid=prev"/>
		<updated>2012-07-31T13:04:24Z</updated>

		<summary type="html">&lt;p&gt;Page on trailing whitespace handling&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;There are different ways to handle trailing whitespace in Emacs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Visualize trailing whitespace ==&lt;br /&gt;
&lt;br /&gt;
Just set the {{Variable|show-trailing-whitespace}} variable:&lt;br /&gt;
{{Snippet|(setq show-trailing-whitespace t)}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Delete trailing whitespace ==&lt;br /&gt;
&lt;br /&gt;
You can delete trailing whitespace in the entire buffer using {{Command|delete-trailing-whitespace}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To automate trailing whitespace deletion before saving the buffer in certain modes, you can add local hooks, e.g:&lt;br /&gt;
{{Snippet|(add-hook 'c-mode-hook (lambda () (add-to-list 'write-file-functions 'delete-trailing-whitespace)))}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Whitespace-mode]]&lt;/div&gt;</summary>
		<author><name>Francesco</name></author>
	</entry>
</feed>