From 29bfcbfec255c3408ae2a6d7b0225a1b59c1550c Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 1 Sep 2011 14:09:19 +0100 Subject: [PATCH] only auto-clean whitespaces on save in modes specifically set to do so --- custom-variables.el | 1 + languages/cucumber.el | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/custom-variables.el b/custom-variables.el index d3702cc..f6a7480 100644 --- a/custom-variables.el +++ b/custom-variables.el @@ -44,6 +44,7 @@ '(tool-bar-mode nil) '(undo-tree-mode-lighter "") '(visual-line-mode nil t) + '(whitespace-action nil) '(winner-mode t nil (winner)) '(yas/global-mode t nil (yasnippet)) '(yas/snippet-dirs (quote ("~/.emacs.d/snippets/custom" "~/.emacs.d/snippets/stock" "~/.emacs.d/el-get/yasnippet/snippets")) nil (yasnippet)) diff --git a/languages/cucumber.el b/languages/cucumber.el index 3037359..81b2886 100644 --- a/languages/cucumber.el +++ b/languages/cucumber.el @@ -1 +1,5 @@ (add-to-list 'auto-mode-alist '("\\.feature" . feature-mode)) + +(add-hook 'feature-mod-hook + (lambda () + (setq whitespace-action (quote (auto-cleanup)))))