I want to delete trailing whitespace on save for every mode except org-mode
.
In my .emacs
, I have the following line:
(add-hook 'before-save-hook 'delete-trailing-whitespace)
I use the use-package
macro, and I tried adding (remove-hook 'before-save-hook 'delete-trailing-whitespace)
to my :config
block, but that removes the hook globally. How can I remove it specifically for org-mode
?
C-h f
. I'll accept as soon as the timer runs down. – Matthew Piziak Aug 03 '15 at 21:39add-hook
to begin with? (A quick test in 24.5 seems to confirm my expectation... is there new functionality in trunk to facilitate this kind of override?) – phils Aug 03 '15 at 22:49