]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-filter): Do nothing if buffer is dead.
authorRichard M. Stallman <rms@gnu.org>
Thu, 13 Oct 1994 07:40:50 +0000 (07:40 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 13 Oct 1994 07:40:50 +0000 (07:40 +0000)
lisp/progmodes/compile.el

index 83d4e3ef15a5ce18eab11d7a0d3771d26b175819..9e1c710037920f7eb481d15372bd75b9727182de 100644 (file)
@@ -566,13 +566,14 @@ See `compilation-mode'."
 (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))
+  (if (buffer-name (process-buffer proc))
       (save-excursion
-       (goto-char (process-mark proc))
-       (insert-before-markers string)
-       (set-marker (process-mark proc) (point))))))
+       (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 ()