Mercurial > emacs
diff lisp/progmodes/compile.el @ 49186:ce4ad428dcab
(compilation-revert-buffer): If buffer has a file, revert it in the normal way.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 13 Jan 2003 08:02:47 +0000 |
parents | 63bc288cd2ae |
children | 3f16391fbada d7ddb3e565de |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Mon Jan 13 08:01:54 2003 +0000 +++ b/lisp/progmodes/compile.el Mon Jan 13 08:02:47 2003 +0000 @@ -1245,8 +1245,11 @@ (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."