Mercurial > emacs
comparison lisp/progmodes/compile.el @ 41037:5dd37d315c33
(recompile): Use compilation-arguments if set, so as to be able to M-x
recompile the exact command which created a compilation-mode buffer.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 14 Nov 2001 04:23:45 +0000 |
parents | 95bf86aa6120 |
children | ab6cfeb406ab |
comparison
equal
deleted
inserted
replaced
41036:aaa6f44a1b96 | 41037:5dd37d315c33 |
---|---|
578 (save-some-buffers (not compilation-ask-about-save) nil) | 578 (save-some-buffers (not compilation-ask-about-save) nil) |
579 (compile-internal command "No more errors")) | 579 (compile-internal command "No more errors")) |
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'." |
590 (set (make-local-variable 'compilation-exit-message-function) | 593 (set (make-local-variable 'compilation-exit-message-function) |
591 (lambda (status code msg) | 594 (lambda (status code msg) |