diff options
| author | Richard M. Stallman | 1999-08-29 19:07:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-08-29 19:07:33 +0000 |
| commit | c4d7c00a24ca2f2dbd93e488efe3cf21b07a0388 (patch) | |
| tree | 5b46ef0bb5dd5d9bdb991ff9bfa8e9775293fc41 /lisp/progmodes/compile.el | |
| parent | 1e68f8d0fe1c31c52e1573398d51ff17f7b282d5 (diff) | |
| download | emacs-c4d7c00a24ca2f2dbd93e488efe3cf21b07a0388.tar.gz emacs-c4d7c00a24ca2f2dbd93e488efe3cf21b07a0388.zip | |
(compilation-parsing-end,compilation-setup)
(compilation-filter, compilation-forget-errors)
(compilation-parse-errors): Use a marker instead of an integer for
`compilation-parsing-end'.
Diffstat (limited to 'lisp/progmodes/compile.el')
| -rw-r--r-- | lisp/progmodes/compile.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 2b8bcdb9432..1f447d8a855 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Roland McGrath <roland@prep.ai.mit.edu> | 5 | ;; Author: Roland McGrath <roland@gnu.org> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| 7 | ;; Keywords: tools, processes | 7 | ;; Keywords: tools, processes |
| 8 | 8 | ||
| @@ -132,7 +132,7 @@ or when it is used with \\[next-error] or \\[compile-goto-error].") | |||
| 132 | minor-mode-alist))) | 132 | minor-mode-alist))) |
| 133 | 133 | ||
| 134 | (defvar compilation-parsing-end nil | 134 | (defvar compilation-parsing-end nil |
| 135 | "Position of end of buffer when last error messages were parsed.") | 135 | "Marker position of end of buffer when last error messages were parsed.") |
| 136 | 136 | ||
| 137 | (defvar compilation-error-message "No more errors" | 137 | (defvar compilation-error-message "No more errors" |
| 138 | "Message to print when no more matches are found.") | 138 | "Message to print when no more matches are found.") |
| @@ -946,7 +946,7 @@ Runs `compilation-mode-hook' with `run-hooks' (which see)." | |||
| 946 | (setq mode-line-process '(":%s")) | 946 | (setq mode-line-process '(":%s")) |
| 947 | (set (make-local-variable 'compilation-error-list) nil) | 947 | (set (make-local-variable 'compilation-error-list) nil) |
| 948 | (set (make-local-variable 'compilation-old-error-list) nil) | 948 | (set (make-local-variable 'compilation-old-error-list) nil) |
| 949 | (set (make-local-variable 'compilation-parsing-end) 1) | 949 | (set (make-local-variable 'compilation-parsing-end) (copy-marker 1)) |
| 950 | (set (make-local-variable 'compilation-directory-stack) | 950 | (set (make-local-variable 'compilation-directory-stack) |
| 951 | (list default-directory)) | 951 | (list default-directory)) |
| 952 | (setq compilation-last-buffer (current-buffer))) | 952 | (setq compilation-last-buffer (current-buffer))) |
| @@ -1080,12 +1080,16 @@ Just inserts the text, but uses `insert-before-markers'." | |||
| 1080 | (if (buffer-name (process-buffer proc)) | 1080 | (if (buffer-name (process-buffer proc)) |
| 1081 | (save-excursion | 1081 | (save-excursion |
| 1082 | (set-buffer (process-buffer proc)) | 1082 | (set-buffer (process-buffer proc)) |
| 1083 | (let ((buffer-read-only nil)) | 1083 | (let ((buffer-read-only nil) |
| 1084 | (end (marker-position compilation-parsing-end))) | ||
| 1084 | (save-excursion | 1085 | (save-excursion |
| 1085 | (goto-char (process-mark proc)) | 1086 | (goto-char (process-mark proc)) |
| 1086 | (insert-before-markers string) | 1087 | (insert-before-markers string) |
| 1088 | (set-marker compilation-parsing-end end) ;don't move it | ||
| 1087 | (run-hooks 'compilation-filter-hook) | 1089 | (run-hooks 'compilation-filter-hook) |
| 1088 | (set-marker (process-mark proc) (point))))))) | 1090 | ;; this seems redundant since we insert-before-marks -stefan |
| 1091 | ;;(set-marker (process-mark proc) (point)) | ||
| 1092 | ))))) | ||
| 1089 | 1093 | ||
| 1090 | ;; Return the cdr of compilation-old-error-list for the error containing point. | 1094 | ;; Return the cdr of compilation-old-error-list for the error containing point. |
| 1091 | (defun compile-error-at-point () | 1095 | (defun compile-error-at-point () |
| @@ -1679,8 +1683,8 @@ Selects a window with point at SOURCE, with another window displaying ERROR." | |||
| 1679 | (set-marker (cdr next-error) nil))) | 1683 | (set-marker (cdr next-error) nil))) |
| 1680 | (setq compilation-old-error-list (cdr compilation-old-error-list))) | 1684 | (setq compilation-old-error-list (cdr compilation-old-error-list))) |
| 1681 | (setq compilation-error-list nil | 1685 | (setq compilation-error-list nil |
| 1682 | compilation-directory-stack (list default-directory) | 1686 | compilation-directory-stack (list default-directory)) |
| 1683 | compilation-parsing-end 1) | 1687 | (set-marker compilation-parsing-end 1) |
| 1684 | ;; Remove the highlighting added by compile-reinitialize-errors: | 1688 | ;; Remove the highlighting added by compile-reinitialize-errors: |
| 1685 | (let ((inhibit-read-only t) | 1689 | (let ((inhibit-read-only t) |
| 1686 | (buffer-undo-list t) | 1690 | (buffer-undo-list t) |
| @@ -1941,7 +1945,7 @@ An error message with no file name and no file name has been seen earlier.")) | |||
| 1941 | 1945 | ||
| 1942 | (forward-line 1))) ; End of while loop. Look at next line. | 1946 | (forward-line 1))) ; End of while loop. Look at next line. |
| 1943 | 1947 | ||
| 1944 | (setq compilation-parsing-end (point)) | 1948 | (set-marker compilation-parsing-end (point)) |
| 1945 | (setq compilation-error-list (nreverse compilation-error-list)) | 1949 | (setq compilation-error-list (nreverse compilation-error-list)) |
| 1946 | ;;; (message "Parsing error messages...done. %d found. %.0f%% of buffer seen." | 1950 | ;;; (message "Parsing error messages...done. %d found. %.0f%% of buffer seen." |
| 1947 | ;;; compilation-num-errors-found | 1951 | ;;; compilation-num-errors-found |