I have two similar functions in C++ that I want to carefully compare. I'm using the emacs function ediff-regions-linewise
to compare them line-by-line. Many of the lines have small differences in their whitespace, for example:
//Line from first function
somefunc(i,j);
//Line from second function
somefunc(i, j);
Ediff-mode is smart enough to know which sections only differ by whitespace: the command ##
nominally means "ignore whitespace". It only causes the cursor to skip sections that differ, but still highlights lines that differ only by whitespace in the same way it highlights lines that differ in some way that matters.
Is there a way to get ediff-mode to stop highlighting lines that are only different because of whitespace?
I have got the following setting in my Emacs config to disable whitespace when diffing (see man diff
for what it does):
(setq ediff-diff-options "-w")
I have these two settings which have the net effect of doing what you're asking:
(setq-default ediff-ignore-similar-regions t)
(setq-default ediff-highlight-all-diffs nil)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With