[LLVMdev] Trailing whitespace removal (important for CVS users!)

Alkis Evlogimenos evlogimenos at gmail.com
Thu Apr 21 13:58:59 PDT 2005


On Thu, 2005-04-21 at 15:57 -0500, Chris Lattner wrote:
> I'd rather not have CVS commit scripts mucking with the code.  If you
> want 
> to have the nightly tester whine about source code with spaces at the
> end 
> of lines (like it whines about compiler warnings), that would be fine.
> 
> BTW, does anyone know how to tell xemacs to autodelete end of line
> spaces?

I am not sure about xemacs but in emacs you do:

M-x whitespace-cleanup

I have the following in my .emacs:

;; Function to untabify a buffer
(defun untabify-buffer () (interactive)
  (whitespace-cleanup)
  (untabify (point-min) (point-max)))

(global-set-key [f7] 'untabify-buffer)

So pressing F7 eliminates all tabs and trailing spaces. I used to have
this done automatically when saving a file, but that was causing more
problems than it solved (usually code is not clean - if I have the
setting in my .emacs it doesn't mean that everyone does).

-- 

Alkis




More information about the llvm-dev mailing list