Reputation: 10817
I am often editing foo.cpp
and bar.cpp
(or foo.tex
and bar.tex
) in one directory.
During these edit sessions, I run make foo
and make bar
many times.
At some point with Emacs 23, I needed to type make foo
and make bar
just once on the respective buffer. Any subsequent invocation of the compile
command would reuse the command last used on that buffer.
Now with Emacs 24.3.50.1, this settings has become even worse than it was (with Emacs 21/22?). There, one compile command was saved per directory. Now it's one command for all buffers.
How do I recover the previous setting? I am not interested in polluting every .cpp
and .tex
file with file-local variables.
Upvotes: 1
Views: 110
Reputation: 4029
Just make the applicable variables buffer-local.
(eval-after-load 'compile
'(progn (make-variable-buffer-local 'compile-command)
(make-variable-buffer-local 'compile-history)))
Upvotes: 1