I'd like to know if Emacs has an option to highlight the portions of C++ source inside .diff files generated by e.g. git diff HEAD~1 or git log -p

Right now I have to rename my .diff file to something like .diff.cpp or just use M+x cpp-mode and use regular C++ highlighting which somewhat works. Can I get that in diff mode?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.