From: Richard M. Stallman Date: Thu, 13 Oct 1994 07:40:50 +0000 (+0000) Subject: (compilation-filter): Do nothing if buffer is dead. X-Git-Tag: emacs-19.34~6343 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=991c70f8948c9d52ac04db47a80dd90e78402132;p=emacs.git (compilation-filter): Do nothing if buffer is dead. --- diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 83d4e3ef15a..9e1c7100379 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -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 ()