[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdesdk/scripts/kde-emacs
From:       Raphael Kubo da Costa <kubito () gmail ! com>
Date:       2011-02-03 23:35:42
Message-ID: 20110203233542.7C14CAC8C5 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1218721 by rkcosta:

kde-emacs: Make whitespace removal optional.

Sometimes one is working on a one-liner and does not want to fix
whitespaces in the whole file, so it is now possible to set
'kde-emacs-delete-trailing-whitespace to nil to disable that.

GNU Emacs already has the delete-trailing-whitespace function; we can
hopefully remove the whitespace removal altogether when an XEmacs
equivalent shows up.

Reviewed-by: dfaure via email.



 M  +4 -0      kde-emacs-core.el  
 M  +6 -0      kde-emacs-vars.el  


--- trunk/KDE/kdesdk/scripts/kde-emacs/kde-emacs-core.el #1218720:1218721
@@ -173,8 +173,12 @@
   (font-lock-mode)
   (c-set-style kde-c-style))
 
+(and (user-variable-p 'kde-emacs-delete-trailing-whitespace)
+     kde-emacs-delete-trailing-whitespace
+     (progn
 (add-hook 'find-file-hooks 'agulbra-c++-clean-out-spaces)
 (add-hook 'write-file-hooks 'agulbra-c++-clean-out-spaces)
+       ))
 
 (add-hook 'c++-mode-hook 'kde-c++-mode-hook)
 (add-hook 'c-mode-hook 'kde-c-mode-hook)
--- trunk/KDE/kdesdk/scripts/kde-emacs/kde-emacs-vars.el #1218720:1218721
@@ -81,6 +81,12 @@
   :group 'kde-devel
   :type 'boolean)
 
+(defcustom kde-emacs-delete-trailing-whitespace 't
+  "Set this variable to true to automatically delete trailing whitespace when a \
buffer is loaded from a file or when it is written. On GNU +Emacs, it is worth seeing \
delete-trailing-whitespace function." +  :group 'kde-devel
+  :type 'boolean)
+
 (defcustom kde-emacs-make "make"
   "Specifies the make command which KDE Emacs will use"
   :group 'kde-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic