emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Idea for diff-mode


From: Han Boetes
Subject: Idea for diff-mode
Date: Thu, 2 Sep 2004 12:54:01 +0200
User-agent: Mutt/1.5.6i

Hi,

I just read this article about the ideal LKML patch:

  
http://kerneltrap.org/node/view/3737?PHPSESSID=fdd31ac2e7467173a877e84f3c83924f#comment

Where I found this paragraph:

- Ensure that your patch does not add new trailing whitespace. The below
  script will fix up your patch by stripping off such whitespace.

  #!/bin/sh

  strip1()
  {
      TMP=$(mktemp /tmp/XXXXXX)
      cp $1 $TMP
      sed -e '/^+/s/[         ]*$//' < $TMP > $1
      rm $TMP
  }

  for i in $*
    do
    strip1 $i
  done


I think it be a great idea if m-x delete-trailing-whitespace in
diff-mode would only remove trailing white-space in lines marked with ^+

What do you think?



# Han
-- 
For all ya        |\      _,,,---,,_      Space is to place as eternity
untamed Daemons   /,`.-'`'    -.  ;-;;,_  is to time. -- Joseph Joubert
OpenBSD-current  |,4-  ) )-,_..;\ (  `'-'
on an i386      '---''(_/--'  `-'\_)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]