add remove-dos-eol utility
Stefan Bund [Wed, 7 Dec 2016 12:06:07 +0000 (13:06 +0100)]
setup/remove-dos-eol.el [new file with mode: 0644]

diff --git a/setup/remove-dos-eol.el b/setup/remove-dos-eol.el
new file mode 100644 (file)
index 0000000..1dc70fb
--- /dev/null
@@ -0,0 +1,9 @@
+(defun remove-dos-eol ()
+  "Do not show ^M in files containing mixed UNIX and DOS line endings."
+  (interactive)
+  (setq buffer-display-table (make-display-table))
+  (aset buffer-display-table ?\^M [])
+  (force-window-update (current-buffer))
+  (redisplay 't))
+
+(global-set-key "\C-cM" 'remove-dos-eol)