Refactor ein:insert-html-shr

This commit is contained in:
Takafumi Arakaki 2012-09-06 19:09:02 +02:00
parent 74bb441400
commit e755a90eb2

View file

@ -72,14 +72,14 @@ Usage::
(ein:insert-html-shr \"<b>HTML</b> string\")
"
(let ((start (point))
end)
(ein:shr-insert-document
(with-temp-buffer
(let ((dom (with-temp-buffer
(erase-buffer)
(insert html-string)
;; FIXME: If URLs are local, they should be adapted here.
(libxml-parse-html-region (point-min) (point-max))))
(start (point))
end)
;; FIXME: If URLs are local, they should be adapted here.
(ein:shr-insert-document dom)
(setq end (point))
(put-text-property start end 'read-only t)
(put-text-property start end 'front-sticky t)))