purcell / whitespace-cleanup-mode

In Emacs, intelligently call whitespace-cleanup on save
126 stars 8 forks source link

Enable using a global defcustom #1

Closed haxney closed 11 years ago

haxney commented 11 years ago

It would be helpful to be able to turn on whitespace-cleanup-mode globally with a defcustom so that I wouldn't have to add it to the hook of every major mode. This is just a matter of adding :global t to define-minor-mode.

My use case is that I want whitespace-cleanup-mode on in all buffers except for a specific few projects which should not have their whitespace automatically cleaned up. My preference would be for whitespace-cleanup-mode to be on globally but turned off in specific projects using a .dir-locals.el file.

This package is a long time coming, thanks!

purcell commented 11 years ago

Thanks for this helpful feedback: I share your use case.

I'm not sure about making whitespace-cleanup-mode itself global with :global t. How would that compare to the alternative of adding an additional global-whitespace-cleanup-mode, which was what I had been considering up to this point?

purcell commented 11 years ago

Okay, separate global-whitespace-cleanup-mode added: feedback welcome!