Function: with-editor-set-process-filter
with-editor-set-process-filter is a byte-compiled function defined in
with-editor.el.
Signature
(with-editor-set-process-filter PROCESS FILTER)
Documentation
Like set-process-filter but keep with-editor-process-filter.
Give PROCESS the new FILTER but keep with-editor-process-filter
if that was added earlier by the advised start-file-process.
Do so by wrapping the two filter functions using a lambda, which
becomes the actual filter. It calls FILTER first, which may or
may not insert the text into the PROCESS's buffer. Then it calls
with-editor-process-filter, passing t as NO-STANDARD-FILTER.
Source Code
;; Defined in ~/.emacs.d/elpa/with-editor-20260301.1317/with-editor.el
(defun with-editor-set-process-filter (process filter)
"Like `set-process-filter' but keep `with-editor-process-filter'.
Give PROCESS the new FILTER but keep `with-editor-process-filter'
if that was added earlier by the advised `start-file-process'.
Do so by wrapping the two filter functions using a lambda, which
becomes the actual filter. It calls FILTER first, which may or
may not insert the text into the PROCESS's buffer. Then it calls
`with-editor-process-filter', passing t as NO-STANDARD-FILTER."
(set-process-filter
process
(if (eq (process-filter process) 'with-editor-process-filter)
`(lambda (proc str)
(,filter proc str)
(with-editor-process-filter proc str t))
filter)))