diff options
| author | Richard M. Stallman | 2003-01-13 08:02:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-01-13 08:02:47 +0000 |
| commit | 9ed2ab9fcaade605b6377f955c98ad13e607d642 (patch) | |
| tree | 10078b3b35243185e974322327b5ede9395433ec | |
| parent | be28f1a745b089606960b4d7082270e360620305 (diff) | |
| download | emacs-9ed2ab9fcaade605b6377f955c98ad13e607d642.tar.gz emacs-9ed2ab9fcaade605b6377f955c98ad13e607d642.zip | |
(compilation-revert-buffer): If buffer has a file, revert it in the normal way.
| -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 f202663a0e4..a51ceff74d3 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1245,8 +1245,11 @@ Runs `compilation-mode-hook' with `run-hooks' (which see)." | |||
| 1245 | (run-hooks 'compilation-mode-hook)) | 1245 | (run-hooks 'compilation-mode-hook)) |
| 1246 | 1246 | ||
| 1247 | (defun compilation-revert-buffer (ignore-auto noconfirm) | 1247 | (defun compilation-revert-buffer (ignore-auto noconfirm) |
| 1248 | (if (or noconfirm (yes-or-no-p (format "Restart compilation? "))) | 1248 | (if buffer-file-name |
| 1249 | (apply 'compile-internal compilation-arguments))) | 1249 | (let (revert-buffer-function) |
| 1250 | (revert-buffer ignore-auto noconfirm preserve-modes)) | ||
| 1251 | (if (or noconfirm (yes-or-no-p (format "Restart compilation? "))) | ||
| 1252 | (apply 'compile-internal compilation-arguments)))) | ||
| 1250 | 1253 | ||
| 1251 | (defun compilation-setup () | 1254 | (defun compilation-setup () |
| 1252 | "Prepare the buffer for the compilation parsing commands to work." | 1255 | "Prepare the buffer for the compilation parsing commands to work." |