On Thursday 21 March 2002 8:16 am, Allan Rae wrote:
> On Wed, 20 Mar 2002, Lars Gullik Bjønnes wrote:
> > What about:
> >      delete-trailing-whitespace
> >      whitespace-cleanup
>
> Actually XEmacs doesn't seem to have these (in either 21.1.14 or
> 21.4.6).  Which emacs and is there a package to load first?
>
> I did find whitespace-mode which does a nice job of distinguishing
> spaces from tabs.  I might use it in future so silly lines which use
> spaces instead of tabs stand out.
>
> Allan. (ARRae)

My emacs (20.7 --- bang up to date?) doesn't have them either. However, 
google is a fabulous resourse:
        gg:delete-trailing-whitespace
gives 
        http://www.unixguide.net/unix/sedoneliner.shtml

        # delete trailing whitespace (spaces, tabs) from end of each line 
        sed 's/[ \t]*$//' # see note on '\t' at end of file

where \t is a tab.

and
        gg:emacs delete-trailing-whitespace
gives
        http://www.dotemacs.de/emacro/emacs/functions.html

which contains the magical expression.

So now my question becomes, how do I modify my .emacs to load this file in 
c-mode and in c++-mode and how do I follow Lars' example and have it on by 
default. Lars"?

Angus

Reply via email to