changeset 2472:f911936cec3f

(compilation-filter): New function. (compile-internal): Make it the process's filter.
author Roland McGrath <roland@gnu.org>
date Wed, 07 Apr 1993 18:34:17 +0000
parents c5e43751f9aa
children 57e371b49128
files lisp/progmodes/compile.el
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Wed Apr 07 18:26:27 1993 +0000
+++ b/lisp/progmodes/compile.el	Wed Apr 07 18:34:17 1993 +0000
@@ -321,6 +321,7 @@
 					       outbuf
 					       command)))
 	(set-process-sentinel proc 'compilation-sentinel)
+	(set-process-filter proc 'compilation-filter)
 	(setq compilation-in-progress (cons proc compilation-in-progress))))
     ;; Make it so the next C-x ` will use this buffer.
     (setq compilation-last-buffer outbuf)))
@@ -404,6 +405,17 @@
 	  (setq compilation-in-progress (delq proc compilation-in-progress))
 	  ))))
 
+(defun compilation-filter (proc string)
+  "Process filter for compilation buffers.
+Just inserts the text, but uses insert-before-markers."
+  (save-excursion
+    (set-buffer (process-buffer proc))
+    (let ((buffer-read-only nil))
+      (save-excursion
+	(goto-char (process-mark proc))
+	(insert-before-markers string)
+	(set-marker (process-mark proc) (point))))))
+
 ;; Return the cdr of compilation-old-error-list for the error containing point.
 (defun compile-error-at-point ()
   (compile-reinitialize-errors nil (point))