Function: url-http-generic-filter
url-http-generic-filter is a byte-compiled function defined in
url-http.el.gz.
Signature
(url-http-generic-filter PROC DATA)
Source Code
;; Defined in /usr/src/emacs/lisp/url/url-http.el.gz
;; Since Emacs 19/20 does not allow you to change the
;; `after-change-functions' hook in the midst of running them, we fake
;; an after change by hooking into the process filter and inserting
;; the data ourselves. This is slightly less efficient, but there
;; were tons of weird ways the after-change code was biting us in the
;; shorts.
;; FIXME this can probably be simplified since the above is no longer true.
(defun url-http-generic-filter (proc data)
;; Sometimes we get a zero-length data chunk after the process has
;; been changed to 'free', which means it has no buffer associated
;; with it. Do nothing if there is no buffer, or 0 length data.
(let ((b (process-buffer proc)))
(when (and (buffer-live-p b) (not (zerop (length data))))
(with-current-buffer b
(url-http-debug "Calling after change function `%s' for `%S'"
url-http-after-change-function proc)
(funcall url-http-after-change-function
(point-max)
(progn
(goto-char (point-max))
(insert data)
(point-max))
(length data))))))