Ask Emacs.
C-h f compile tells you:
Compile the program including the current buffer. Default: run make.
Runs COMMAND, a shell command, in a separate process asynchronously
with output going to the buffer *compilation*.
You can then use the command C-x ` to find the next error message
and move to the source code that caused it.
If optional second arg COMINT is t the buffer will be in Comint mode with
compilation-shell-minor-mode.
Interactively, prompts for the command if the variable
compilation-read-command is non-nil; otherwise uses compile-command.
With prefix arg, always prompts.
Additionally, with universal prefix arg, compilation buffer will be in
comint mode, i.e. interactive.
To run more than one compilation at once, start one then rename
the *compilation* buffer to some other name with
M-x rename-buffer. Then switch buffers and start the new compilation.
It will create a new *compilation* buffer.
On most systems, termination of the main compilation process
kills its subprocesses.
The name used for the buffer is actually whatever is returned by
the function in compilation-buffer-name-function, so you can set that
to a function that generates a unique name.
The part in bold tells you the answer: be sure that user option compilation-read-command is set to a non-nil value.
And if you click the compilation-read-command link in that *Help* output then you get even more information about its behavior:
Non-nil means M-x compile reads the compilation command to use.
Otherwise, M-x compile just uses the value of compile-command.
Note that changing this to nil may be a security risk, because a
file might define a malicious compile-command as a file local
variable, and you might not notice. Therefore, compile-command
is considered unsafe if this variable is nil.
ccc-runhttps://github.com/abo-abo/cc-chainsaw/blob/master/cc-chainsaw.el#L303 – abo-abo Jan 12 '16 at 09:53M-xto access all built-in stuff, andeval-bufferto try new stuff. You won't learn it all in a day, but after some time investment it's really worth. Also have a look at SICP if you don't know any other LISP. – abo-abo Jan 12 '16 at 12:18