Function: shr-replace-image

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

Signature

(shr-replace-image DATA START END &optional FLAGS)

Source Code

;; Defined in /usr/src/emacs/lisp/net/shr.el.gz
(defun shr-replace-image (data start end &optional flags)
  (save-excursion
    (save-restriction
      (widen)
      (let ((alt (buffer-substring start end))
	    (properties (text-properties-at start))
            ;; We don't want to record these changes.
            (buffer-undo-list t)
	    (inhibit-read-only t))
        (remove-overlays start end)
	(delete-region start end)
	(goto-char start)
	(funcall shr-put-image-function data alt flags)
	(while properties
	  (let ((type (pop properties))
		(value (pop properties)))
	    (unless (memq type '(display image-zoom))
	      (put-text-property start (point) type value))))))))