diff options
| author | Glenn Morris | 2014-05-08 23:42:39 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-05-08 23:42:39 -0700 |
| commit | bb1f4b8f9a0539e57f5fb31c8168950c92aa4492 (patch) | |
| tree | 0317deae2893b9c12a60178111ffaf85dad9f90f | |
| parent | c055a50b4a1a0785e4008f80e8724ee16d5cf3cf (diff) | |
| download | emacs-bb1f4b8f9a0539e57f5fb31c8168950c92aa4492.tar.gz emacs-bb1f4b8f9a0539e57f5fb31c8168950c92aa4492.zip | |
* compile.el (recompile): Handle C-u M-x recompile from non-compilation buffer
Fixes: debbugs:17444
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f3a245e2ad..c1b13e7cebb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-05-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/compile.el (recompile): | ||
| 4 | Handle C-u M-x recompile from a non-compilation buffer. (Bug#17444) | ||
| 5 | |||
| 1 | 2014-05-08 Juri Linkov <juri@jurta.org> | 6 | 2014-05-08 Juri Linkov <juri@jurta.org> |
| 2 | 7 | ||
| 3 | * dired.el (dired-check-switches, dired-switches-recursive-p): | 8 | * dired.el (dired-check-switches, dired-switches-recursive-p): |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f6a94e8bf8c..30f30dfe83f 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1430,7 +1430,7 @@ If optional second arg COMINT is t the buffer will be in Comint mode with | |||
| 1430 | `compilation-shell-minor-mode'. | 1430 | `compilation-shell-minor-mode'. |
| 1431 | 1431 | ||
| 1432 | Interactively, prompts for the command if the variable | 1432 | Interactively, prompts for the command if the variable |
| 1433 | `compilation-read-command' is non-nil; otherwise uses`compile-command'. | 1433 | `compilation-read-command' is non-nil; otherwise uses `compile-command'. |
| 1434 | With prefix arg, always prompts. | 1434 | With prefix arg, always prompts. |
| 1435 | Additionally, with universal prefix arg, compilation buffer will be in | 1435 | Additionally, with universal prefix arg, compilation buffer will be in |
| 1436 | comint mode, i.e. interactive. | 1436 | comint mode, i.e. interactive. |
| @@ -1469,12 +1469,13 @@ If the optional argument `edit-command' is non-nil, the command can be edited." | |||
| 1469 | (interactive "P") | 1469 | (interactive "P") |
| 1470 | (save-some-buffers (not compilation-ask-about-save) | 1470 | (save-some-buffers (not compilation-ask-about-save) |
| 1471 | compilation-save-buffers-predicate) | 1471 | compilation-save-buffers-predicate) |
| 1472 | (let ((default-directory (or compilation-directory default-directory))) | 1472 | (let ((default-directory (or compilation-directory default-directory)) |
| 1473 | (command (eval compile-command))) | ||
| 1473 | (when edit-command | 1474 | (when edit-command |
| 1474 | (setcar compilation-arguments | 1475 | (setq command (compilation-read-command (or (car compilation-arguments) |
| 1475 | (compilation-read-command (car compilation-arguments)))) | 1476 | command))) |
| 1476 | (apply 'compilation-start (or compilation-arguments | 1477 | (if compilation-arguments (setcar compilation-arguments command))) |
| 1477 | `(,(eval compile-command)))))) | 1478 | (apply 'compilation-start (or compilation-arguments (list command))))) |
| 1478 | 1479 | ||
| 1479 | (defcustom compilation-scroll-output nil | 1480 | (defcustom compilation-scroll-output nil |
| 1480 | "Non-nil to scroll the *compilation* buffer window as output appears. | 1481 | "Non-nil to scroll the *compilation* buffer window as output appears. |