aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-05-19 01:04:04 +0000
committerRichard M. Stallman1997-05-19 01:04:04 +0000
commit58856335864a1dc5b56402d54cd8ef04e3082178 (patch)
tree1cdb89e521dbd8f6d1cd8fc10f985f10ec1f2122
parent63c7b220950a50eefd691fd433c91171ca9e84f5 (diff)
downloademacs-58856335864a1dc5b56402d54cd8ef04e3082178.tar.gz
emacs-58856335864a1dc5b56402d54cd8ef04e3082178.zip
(compilation-parse-errors): Fix paren error.
(compilation-arguments): New local variable. (compile-internal): Set the variable compilation-arguments. (compilation-revert-buffer): New function. (compilation-mode): Set revert-buffer-function.
-rw-r--r--lisp/progmodes/compile.el25
1 files changed, 20 insertions, 5 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 27d4995f3d0..3587e342dac 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -133,6 +133,9 @@ or when it is used with \\[next-error] or \\[compile-goto-error].")
133(defvar compilation-error-message "No more errors" 133(defvar compilation-error-message "No more errors"
134 "Message to print when no more matches are found.") 134 "Message to print when no more matches are found.")
135 135
136(defvar compilation-arguments nil
137 "Arguments that were given to `compile-internal'.")
138
136(defvar compilation-num-errors-found) 139(defvar compilation-num-errors-found)
137 140
138(defvar compilation-error-regexp-alist 141(defvar compilation-error-regexp-alist
@@ -627,6 +630,12 @@ Returns the compilation buffer created."
627 file-regexp-alist) 630 file-regexp-alist)
628 (set (make-local-variable 'compilation-nomessage-regexp-alist) 631 (set (make-local-variable 'compilation-nomessage-regexp-alist)
629 nomessage-regexp-alist) 632 nomessage-regexp-alist)
633 (set (make-local-variable 'compilation-arguments)
634 (list command error-message
635 name-of-mode parser
636 error-regexp-alist name-function
637 enter-regexp-alist leave-regexp-alist
638 file-regexp-alist nomessage-regexp-alist))
630 (setq default-directory thisdir 639 (setq default-directory thisdir
631 compilation-directory-stack (list default-directory)) 640 compilation-directory-stack (list default-directory))
632 (set-window-start outwin (point-min)) 641 (set-window-start outwin (point-min))
@@ -774,8 +783,14 @@ Runs `compilation-mode-hook' with `run-hooks' (which see)."
774 (compilation-setup) 783 (compilation-setup)
775 (set (make-local-variable 'font-lock-defaults) 784 (set (make-local-variable 'font-lock-defaults)
776 '(compilation-mode-font-lock-keywords t)) 785 '(compilation-mode-font-lock-keywords t))
786 (set (make-local-variable 'revert-buffer-function)
787 'compilation-revert-buffer)
777 (run-hooks 'compilation-mode-hook)) 788 (run-hooks 'compilation-mode-hook))
778 789
790(defun compilation-revert-buffer (ignore-auto noconfirm)
791 (if (or noconfirm (yes-or-no-p (format "Restart compilation? ")))
792 (apply 'compile-internal compilation-arguments)))
793
779;; Prepare the buffer for the compilation parsing commands to work. 794;; Prepare the buffer for the compilation parsing commands to work.
780(defun compilation-setup () 795(defun compilation-setup ()
781 ;; Make the buffer's mode line show process state. 796 ;; Make the buffer's mode line show process state.
@@ -1710,11 +1725,11 @@ An error message with no file name and no file name has been seen earlier."))
1710 (setq compilation-directory-stack 1725 (setq compilation-directory-stack
1711 (cons filename compilation-directory-stack) 1726 (cons filename compilation-directory-stack)
1712 default-directory filename))) 1727 default-directory filename)))
1713 (and (eq type 'leave 1728 (and (eq type 'leave)
1714 stack 1729 stack
1715 (setq compilation-directory-stack (cdr stack)) 1730 (setq compilation-directory-stack (cdr stack))
1716 (setq stack (car compilation-directory-stack)) 1731 (setq stack (car compilation-directory-stack))
1717 (setq default-directory stack))) 1732 (setq default-directory stack))
1718 (goto-char end-of-match) ; Prepare to look at next message. 1733 (goto-char end-of-match) ; Prepare to look at next message.
1719 (and limit-search (>= end-of-match limit-search) 1734 (and limit-search (>= end-of-match limit-search)
1720 ;; The user wanted a specific error, and we're past it. 1735 ;; The user wanted a specific error, and we're past it.