# HG changeset patch # User Richard M. Stallman # Date 1042444967 0 # Node ID ce4ad428dcab9aa9ae22480fccc27d49a3e9efbb # Parent d2cbeb3c7b3db76d04748f171f898e8e9a1c3eaf (compilation-revert-buffer): If buffer has a file, revert it in the normal way. diff -r d2cbeb3c7b3d -r ce4ad428dcab lisp/progmodes/compile.el --- 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."