Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
49185:d2cbeb3c7b3d | 49186:ce4ad428dcab |
---|---|
1243 (set (make-local-variable 'revert-buffer-function) | 1243 (set (make-local-variable 'revert-buffer-function) |
1244 'compilation-revert-buffer) | 1244 'compilation-revert-buffer) |
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." |
1253 ;; Make the buffer's mode line show process state. | 1256 ;; Make the buffer's mode line show process state. |
1254 (setq mode-line-process '(":%s")) | 1257 (setq mode-line-process '(":%s")) |