Function: shr--async-put-image

shr--async-put-image is a byte-compiled function defined in shr.el.gz.

Signature

(shr--async-put-image URL BEG END &key FLAGS SILENT INHIBIT-COOKIES QUEUE)

Documentation

Fetch image from URL and place it on BEG..END.

FLAGS has the same meaning as for shr-put-image. SILENT and inhibit-cookies have the same meaning as for ulkr-retrieve..
If QUEUE is non-nil use `url-queue-retrieve’ instead of `url-retrieve’.

Source Code

;; Defined in /usr/src/emacs/lisp/net/shr.el.gz
(cl-defun shr--async-put-image (url beg end
                                    &key flags silent inhibit-cookies queue)
  "Fetch image from URL and place it on BEG..END.
FLAGS has the same meaning as for `shr-put-image'.
SILENT and inhibit-cookies have the same meaning as for `ulkr-retrieve.'.
If QUEUE is non-nil use `url-queue-retrieve’ instead of  `url-retrieve’."
  (let ((ol (make-overlay beg end nil t)))
    ;; We could also try to delete the overlay when the text between BEG..END
    ;; is modified (via `modification-hooks'), but then we'd have to be careful
    ;; not to do it too eagerly (e.g. it's normal for text-properties to be
    ;; applied).
    (overlay-put ol 'evaporate t)
    (funcall (if queue #'url-queue-retrieve #'url-retrieve)
             url #'shr--image-fetched
             (list ol flags) silent inhibit-cookies)))