Function: eshell-insertion-filter
eshell-insertion-filter is a byte-compiled function defined in
esh-proc.el.gz.
Signature
(eshell-insertion-filter PROC STRING)
Documentation
Insert a string into the eshell buffer, or a process/file/buffer.
PROC is the process for which we're inserting output. STRING is the output.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-proc.el.gz
(defun eshell-insertion-filter (proc string)
"Insert a string into the eshell buffer, or a process/file/buffer.
PROC is the process for which we're inserting output. STRING is the
output."
(when (buffer-live-p (process-buffer proc))
(with-current-buffer (process-buffer proc)
(let ((entry (assq proc eshell-process-list)))
(when entry
(setcar (nthcdr 3 entry)
(concat (nth 3 entry) string))
(unless (nth 4 entry) ; already being handled?
(while (nth 3 entry)
(let ((data (nth 3 entry)))
(setcar (nthcdr 3 entry) nil)
(setcar (nthcdr 4 entry) t)
(eshell-output-object data nil (cadr entry))
(setcar (nthcdr 4 entry) nil)))))))))