How do I get Emacs to always remember the last compile-command? My compile-command (cc) in Emacs 24 settings is pure vanilla, no bells and whistles. I only changed the cc string itself ("python build.py"), and I sometimes type a different cc by hand and run it. But then Emacs tries to be helpful and remember a cc based on different buffers, it seems quite randomly. For example I change directory in dired and I get a compile command that is completely unrelated to what I am trying to do. Is there a way to disable compile-command helpfulness feature so it only remembers the last one? BTW, I usually get the last cc, but sometimes the feature freaks out.