I'm on OSX 10.9.4 and I was previously running emacs 24.3 installed via brew.

This morning I got around to asking brew to upgrade me to 24.4. Everything seemed to go smoothly, except csharp-mode no longer functions correctly. On opening a .cs file I get this error:

File mode specification error: (error "Recursive load" 

I still have 24.3 on my machine and I can open .cs files correctly in that.

Unfortunately csharp mode seems to be dead - it's not been touched in a few years. Any help or pointers as to how I can hack this to work would be appreciated.

  • 1
    Did you recompile csharp-mode.el after the update? – Tom Regner Oct 31 '14 at 10:22
  • I just upgraded then re-opened emacs. Deleting the .elc files for csharp in the elpa dir did fix the problem, but that's probably not the proper thing to do. What's the best way to recompile all packages? – tenpn Oct 31 '14 at 10:32
  • ah: stackoverflow.com/questions/24725778/… – tenpn Oct 31 '14 at 10:33
  • M-: (byte-recompile-directory package-user-dir nil 'force) – tenpn Oct 31 '14 at 10:33
  • Cool! Most problems I encounter after an update are due to old byte-code, I'm glad that was your problem too. – Tom Regner Oct 31 '14 at 10:37

My problem was that the byte-compiled version of csharp-mode wasn't compatible with the upgrade. It seems it's a good idea to recompile all files on upgrading emacs, see this question: https://stackoverflow.com/questions/24725778/how-to-rebuild-elpa-packages-after-upgrade-of-emacs

tl;dr: M-: (byte-recompile-directory package-user-dir nil 'force) fixes all problems.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.