                             headers))))
 
 (defun elfeed-curl-enqueue (url cb &optional headers)
+  "Just like `elfeed-curl-retrieve', but restricts concurrent fetches."
   (let ((entry (list url cb headers)))
     (setf elfeed-curl-queue (nconc elfeed-curl-queue (list entry)))
     (elfeed-curl--run-queue)))

    (delete-region (point-min) (point))))

(defun elfeed-curl--parse-response ()
  (re-search-forward "HTTP/1.[0-9] +\\([0-9]+\\)")
  (forward-line 1)
  (string-to-number (match-string 1)))

(defun elfeed-curl--parse-http ()
  (setf elfeed-curl-status-code nil)
  (while (null elfeed-curl-status-code)
    (setf (point) (point-min)

        (when is-http
          (elfeed-curl--parse-http))
        (setf (point) (point-min))
        (elfeed-curl--decode)
        (funcall cb t)))))

(defun elfeed-curl-retrieve (url cb &optional headers)
  "Retrieve contents from URL asynchronously, calling CB with one status argument.
The destination buffer is set at the current buffer for the
callback, which is responsible for killing the buffer. HEADERS is
an alist of additional headers to add to the HTTP request. This
function returns the destination buffer."
  (let* ((buffer (generate-new-buffer (format "*curl %s*" url)))
         (is-http (elfeed-curl--url-is-http url))
         (args (elfeed-curl--args is-http url headers)))
