aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2003-01-13 08:02:47 +0000
committerRichard M. Stallman <[email protected]>2003-01-13 08:02:47 +0000
commit9ed2ab9fcaade605b6377f955c98ad13e607d642 (patch)
tree10078b3b35243185e974322327b5ede9395433ec /lisp/progmodes/compile.el
parentbe28f1a745b089606960b4d7082270e360620305 (diff)
(compilation-revert-buffer): If buffer has a file, revert it in the normal way.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f202663a0e..a51ceff74d 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1245,8 +1245,11 @@ Runs `compilation-mode-hook' with `run-hooks' (which see)."
(run-hooks 'compilation-mode-hook))
(defun compilation-revert-buffer (ignore-auto noconfirm)
- (if (or noconfirm (yes-or-no-p (format "Restart compilation? ")))
- (apply 'compile-internal compilation-arguments)))
+ (if buffer-file-name
+ (let (revert-buffer-function)
+ (revert-buffer ignore-auto noconfirm preserve-modes))
+ (if (or noconfirm (yes-or-no-p (format "Restart compilation? ")))
+ (apply 'compile-internal compilation-arguments))))
(defun compilation-setup ()
"Prepare the buffer for the compilation parsing commands to work."