Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
eadb6068
Commit
eadb6068
authored
Jun 28, 2013
by
Ivan Kanis
Committed by
Lars Magne Ingebrigtsen
Jun 28, 2013
Browse files
* net/shr.el (shr-render-region): New function.
parent
75dbaf9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/net/shr.el
lisp/net/shr.el
+11
-0
No files found.
lisp/ChangeLog
View file @
eadb6068
2013-06-28 Ivan Kanis <ivan@kanis.fr>
* net/shr.el (shr-render-region): New function.
* net/eww.el: Autoload `eww-browse-url'.
2013-06-27 Dmitry Gutov <dgutov@yandex.ru>
...
...
lisp/net/shr.el
View file @
eadb6068
...
...
@@ -166,6 +166,17 @@ cid: URL as the argument.")
(
libxml-parse-html-region
(
point-min
)
(
point-max
))))
(
goto-char
(
point-min
)))
(
defun
shr-render-region
(
begin
end
&optional
buffer
)
"Display the HTML rendering of the region between BEGIN and END."
(
interactive
"r"
)
(
unless
(
fboundp
'libxml-parse-html-region
)
(
error
"This function requires Emacs to be compiled with libxml2"
))
(
with-current-buffer
(
or
buffer
(
current-buffer
))
(
let
((
dom
(
libxml-parse-html-region
begin
end
)))
(
delete-region
begin
end
)
(
goto-char
begin
)
(
shr-insert-document
dom
))))
(
defun
shr-visit-file
(
file
)
"Parse FILE as an HTML document, and render it in a new buffer."
(
interactive
"fHTML file name: "
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment