changeset 25426:a08bfd064439

(compilation-parsing-end,compilation-setup) (compilation-filter, compilation-forget-errors) (compilation-parse-errors): Use a marker instead of an integer for `compilation-parsing-end'.
author Richard M. Stallman <rms@gnu.org>
date Sun, 29 Aug 1999 19:07:33 +0000
parents f85f374e5395
children dde5fcbfa2af
files lisp/progmodes/compile.el
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Sun Aug 29 19:05:44 1999 +0000
+++ b/lisp/progmodes/compile.el	Sun Aug 29 19:07:33 1999 +0000
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
 
-;; Author: Roland McGrath <roland@prep.ai.mit.edu>
+;; Author: Roland McGrath <roland@gnu.org>
 ;; Maintainer: FSF
 ;; Keywords: tools, processes
 
@@ -132,7 +132,7 @@
 				 minor-mode-alist)))
 
 (defvar compilation-parsing-end nil
-  "Position of end of buffer when last error messages were parsed.")
+  "Marker position of end of buffer when last error messages were parsed.")
 
 (defvar compilation-error-message "No more errors"
   "Message to print when no more matches are found.")
@@ -946,7 +946,7 @@
   (setq mode-line-process '(":%s"))
   (set (make-local-variable 'compilation-error-list) nil)
   (set (make-local-variable 'compilation-old-error-list) nil)
-  (set (make-local-variable 'compilation-parsing-end) 1)
+  (set (make-local-variable 'compilation-parsing-end) (copy-marker 1))
   (set (make-local-variable 'compilation-directory-stack)
        (list default-directory))
   (setq compilation-last-buffer (current-buffer)))
@@ -1080,12 +1080,16 @@
   (if (buffer-name (process-buffer proc))
       (save-excursion
 	(set-buffer (process-buffer proc))
-	(let ((buffer-read-only nil))
+	(let ((buffer-read-only nil)
+	      (end (marker-position compilation-parsing-end)))
 	  (save-excursion
 	    (goto-char (process-mark proc))
 	    (insert-before-markers string)
+	    (set-marker compilation-parsing-end end) ;don't move it
 	    (run-hooks 'compilation-filter-hook)
-	    (set-marker (process-mark proc) (point)))))))
+	    ;; this seems redundant since we insert-before-marks   -stefan
+	    ;;(set-marker (process-mark proc) (point))
+	    )))))
 
 ;; Return the cdr of compilation-old-error-list for the error containing point.
 (defun compile-error-at-point ()
@@ -1679,8 +1683,8 @@
 	  (set-marker (cdr next-error) nil)))
     (setq compilation-old-error-list (cdr compilation-old-error-list)))
   (setq compilation-error-list nil
-	compilation-directory-stack (list default-directory)
-	compilation-parsing-end 1)
+	compilation-directory-stack (list default-directory))
+  (set-marker compilation-parsing-end 1)
   ;; Remove the highlighting added by compile-reinitialize-errors:
   (let ((inhibit-read-only t)
 	(buffer-undo-list t)
@@ -1941,7 +1945,7 @@
 
 	(forward-line 1)))		; End of while loop. Look at next line.
 
-    (setq compilation-parsing-end (point))
+    (set-marker compilation-parsing-end (point))
     (setq compilation-error-list (nreverse compilation-error-list))
 ;;; (message "Parsing error messages...done. %d found. %.0f%% of buffer seen."
 ;;;	     compilation-num-errors-found