diff options
| author | Richard M. Stallman | 2001-11-14 04:23:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-11-14 04:23:45 +0000 |
| commit | 6867356ababf3f4345348255e3a414ce57ee7659 (patch) | |
| tree | 4b06799c5b2e09176e3d5352f8d6a6db0d321897 | |
| parent | 10bcf543b710654af1d3857c3b4b5fdcb8f27621 (diff) | |
| download | emacs-6867356ababf3f4345348255e3a414ce57ee7659.tar.gz emacs-6867356ababf3f4345348255e3a414ce57ee7659.zip | |
(recompile): Use compilation-arguments if set, so as to be able to M-x
recompile the exact command which created a compilation-mode buffer.
| -rw-r--r-- | lisp/progmodes/compile.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 2ab31cb764e..7e046c3ee03 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -580,10 +580,13 @@ to a function that generates a unique name." | |||
| 580 | 580 | ||
| 581 | ;; run compile with the default command line | 581 | ;; run compile with the default command line |
| 582 | (defun recompile () | 582 | (defun recompile () |
| 583 | "Re-compile the program including the current buffer." | 583 | "Re-compile the program including the current buffer. |
| 584 | If this is run in a compilation-mode buffer, re-use the arguments from the | ||
| 585 | original use. Otherwise, it recompiles using `compile-command'." | ||
| 584 | (interactive) | 586 | (interactive) |
| 585 | (save-some-buffers (not compilation-ask-about-save) nil) | 587 | (save-some-buffers (not compilation-ask-about-save) nil) |
| 586 | (compile-internal (eval compile-command) "No more errors")) | 588 | (apply 'compile-internal (or compilation-arguments |
| 589 | `(,(eval compile-command) "No more errors")))) | ||
| 587 | 590 | ||
| 588 | (defun grep-process-setup () | 591 | (defun grep-process-setup () |
| 589 | "Set up `compilation-exit-message-function' for `grep'." | 592 | "Set up `compilation-exit-message-function' for `grep'." |