I’m running my Ubuntu install in the swedish language so when I compile my c++ program thru emacs it spits out the warnings in swedish. That makes it harder to search for solutions to problem and to ask questions here on Stack Overflow. Therefor I ask how I can make Emacs change the LANG-parameter before executing make -k. It seems like it should’nt be that hard. But I could’nt figure it out by googleing.
Solution
Based om sepp2k:s answer this is what I added to my .emacs file:
; Change compile-command
(add-hook 'c-mode-common-hook
(lambda ()
(set (make-local-variable 'compile-command) "LANG=C make -k")))
You can just use
LANG=C make -kas your compilation command. This will invokemakewithLANGset toC.