Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

automatically enable whitespace mode in diff mode

Tags:

emacs

elisp

I have googled on this but can't find any elisp script for this. Sometimes i do a whitespace-cleanup then diff-buffer-with-file to see what whitespace-cleanup has done.

like image 922
ggg Avatar asked Jan 28 '26 18:01

ggg


1 Answers

If you want whitespace-mode enabled for all diff-mode buffers:

(add-hook 'diff-mode-hook 
          '(lambda () 
            (whitespace-mode 1)))
like image 176
assem Avatar answered Jan 30 '26 10:01

assem



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!