diff options
| author | Eli Zaretskii | 2004-02-16 12:53:25 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2004-02-16 12:53:25 +0000 |
| commit | ebb8cb682a16160f5b2db373f5e7276dd74f1892 (patch) | |
| tree | 3d157209c6f60232a5011b774f14927ec47d70ba | |
| parent | a71b3805cd48d60dc80ace3da006195235152d31 (diff) | |
| download | emacs-ebb8cb682a16160f5b2db373f5e7276dd74f1892.tar.gz emacs-ebb8cb682a16160f5b2db373f5e7276dd74f1892.zip | |
(compilation-directory): New defvar.
(compile): Save current directory in compilation-directory.
(recompile): Bind default-directory to compilation-directory if
that is non-nil.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4176661ca90..096169d8c5b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2004-02-16 Alfred M. Szmidt <ams@kemisten.nu> (tiny change) | ||
| 2 | |||
| 3 | * progmodes/compile.el (compilation-directory): New defvar. | ||
| 4 | (compile): Save current directory in compilation-directory. | ||
| 5 | (recompile): Bind default-directory to compilation-directory if | ||
| 6 | that is non-nil. | ||
| 7 | |||
| 1 | 2004-02-16 Dave Love <fx@gnu.org> | 8 | 2004-02-16 Dave Love <fx@gnu.org> |
| 2 | 9 | ||
| 3 | * newcomment.el (comment-insert-comment-function) | 10 | * newcomment.el (comment-insert-comment-function) |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index de050411411..5f9ffbf2c33 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -386,6 +386,9 @@ If any FILE-FORMAT is given, each is a format string to produce a file name to | |||
| 386 | try; %s in the string is replaced by the text matching the FILE-IDX'th | 386 | try; %s in the string is replaced by the text matching the FILE-IDX'th |
| 387 | subexpression.") | 387 | subexpression.") |
| 388 | 388 | ||
| 389 | (defvar compilation-directory nil | ||
| 390 | "Directory to restore to when doing `recompile'.") | ||
| 391 | |||
| 389 | (defvar compilation-enter-directory-regexp-alist | 392 | (defvar compilation-enter-directory-regexp-alist |
| 390 | '( | 393 | '( |
| 391 | ;; Matches lines printed by the `-w' option of GNU Make. | 394 | ;; Matches lines printed by the `-w' option of GNU Make. |
| @@ -578,6 +581,7 @@ to a function that generates a unique name." | |||
| 578 | (unless (equal command (eval compile-command)) | 581 | (unless (equal command (eval compile-command)) |
| 579 | (setq compile-command command)) | 582 | (setq compile-command command)) |
| 580 | (save-some-buffers (not compilation-ask-about-save) nil) | 583 | (save-some-buffers (not compilation-ask-about-save) nil) |
| 584 | (setq compilation-directory default-directory) | ||
| 581 | (compile-internal command "No more errors")) | 585 | (compile-internal command "No more errors")) |
| 582 | 586 | ||
| 583 | ;; run compile with the default command line | 587 | ;; run compile with the default command line |
| @@ -587,8 +591,10 @@ If this is run in a compilation-mode buffer, re-use the arguments from the | |||
| 587 | original use. Otherwise, it recompiles using `compile-command'." | 591 | original use. Otherwise, it recompiles using `compile-command'." |
| 588 | (interactive) | 592 | (interactive) |
| 589 | (save-some-buffers (not compilation-ask-about-save) nil) | 593 | (save-some-buffers (not compilation-ask-about-save) nil) |
| 590 | (apply 'compile-internal (or compilation-arguments | 594 | (let ((default-directory (or compilation-directory default-directory))) |
| 591 | `(,(eval compile-command) "No more errors")))) | 595 | (apply 'compile-internal (or compilation-arguments |
| 596 | `(,(eval compile-command) | ||
| 597 | "No more errors"))))) | ||
| 592 | 598 | ||
| 593 | (defcustom compilation-scroll-output nil | 599 | (defcustom compilation-scroll-output nil |
| 594 | "*Non-nil to scroll the *compilation* buffer window as output appears. | 600 | "*Non-nil to scroll the *compilation* buffer window as output appears. |