I think it works ...
(defun c-w-c ()
(interactive)
(call-interactively 'compile t (vector 21 (this-command-keys-vector))))
(global-set-key (kbd "C-x c") 'c-w-c)
The "21" added to the vector is the ctrl-u prefix key, and it seems to be deceiving the compilation function, thinking it was called with Cu Cx c.
Edit:
This did not work, but it does:
(defun c-w-c ()
(interactive)
(setq current-prefix-arg '(4))
(call-interactively 'compile))
source
share