+2014-05-09 Glenn Morris <rgm@gnu.org>
+
+ * progmodes/compile.el (recompile):
+ Handle C-u M-x recompile from a non-compilation buffer. (Bug#17444)
+
2014-05-08 Juri Linkov <juri@jurta.org>
* dired.el (dired-check-switches, dired-switches-recursive-p):
`compilation-shell-minor-mode'.
Interactively, prompts for the command if the variable
-`compilation-read-command' is non-nil; otherwise uses`compile-command'.
+`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.
(interactive "P")
(save-some-buffers (not compilation-ask-about-save)
compilation-save-buffers-predicate)
- (let ((default-directory (or compilation-directory default-directory)))
+ (let ((default-directory (or compilation-directory default-directory))
+ (command (eval compile-command)))
(when edit-command
- (setcar compilation-arguments
- (compilation-read-command (car compilation-arguments))))
- (apply 'compilation-start (or compilation-arguments
- `(,(eval compile-command))))))
+ (setq command (compilation-read-command (or (car compilation-arguments)
+ command)))
+ (if compilation-arguments (setcar compilation-arguments command)))
+ (apply 'compilation-start (or compilation-arguments (list command)))))
(defcustom compilation-scroll-output nil
"Non-nil to scroll the *compilation* buffer window as output appears.