You can still see the same problem with the above if right after opening the
file you do M->
Yes, I can. In fact if I leave y-or-n-p defined as it should be, I see the long pause twice - once when I visit the file and once again when I do "M->". Is Emacs font-lockifying the buffer twice?
So it's a conjunction of mostly 2 problems:
- accidental use of C mode.
- slowness of C font-lock-keywords on non-C text.
I'm not sure how to best avoid/fix the problem.
Would it help to treat ".patch" files specially? I notice inhibit-first-line-modes-regexps is treating .tar and .tgz files specially, but possibly only for leading -*- lines. We know that .patch files are potentially going to contain file local variables which we shouldn't honour.
Chris.