[LLVMdev] Trailing whitespace removal (important for CVS users!)
isanbard at gmail.com
Thu Apr 21 13:51:40 PDT 2005
On 4/21/05, Chris Lattner <sabre at nondot.org> wrote:
> On Thu, 21 Apr 2005, Reid Spencer wrote:
> > Why not put all this into a pre-commit filter in CVS and be done with
> > it? We'd never be bothered with it again as it would never be committed
> > again.
> 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?
"removes all whitespace at the end of every line in the buffer"
(setq end (point-marker))
; set up for the first line
(while (< (point) end)
(re-search-backward "[^ &^ &^
; save the non-whitespace char
(delete-region (point) (mark))
; put the <CR> we just deleted back
); end kill-trailing-whitespace
More information about the llvm-dev