Well, not really a patch, but this: find . -name "*.cc" -o -name "*.h" \ | xargs sed -i -e 's/mode: cpp/mode: c++/' ...fixes opening the *.cc and *.h files in the proper C++ mode in XEmacs and doesn't break it with GNU Emacs or vim.