changeset 51:dca677354b38

Add remove-ctrl-m command
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 02 Apr 2012 11:32:32 -0400
parents 5f95b63347ec
children 333ce650e6f3
files dotemacs.el
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dotemacs.el
+++ b/dotemacs.el
@@ -256,3 +256,10 @@
 ;; Something seems to clobber whitespace-mode, this should fix it
 (whitespace-toggle-options 'whitespace-style)
 
+(defun hide-ctrl-M ()
+  "Hides the annoying '^M' showing up in files containing mixed
+UNIX and DOS line endings."
+  (interactive)
+  (setq buffer-display-table (make-display-table))
+  (aset buffer-display-table ?\^M []))
+