summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-06-18 00:10:56 -0700
committerGlenn Morris <rgm@gnu.org>2013-06-18 00:10:56 -0700
commit0143b8a3b1b32510d7eec398aa4a3d02c02cba61 (patch)
tree1100b9058e32867babec348d23276a7550931193
parentf2f426ca48ece2c3275545f11b32a3ed2e0bdde5 (diff)
* lisp/gnus/shr.el (libxml-parse-html-region): Declare.
(shr-render-buffer): Explicit error if no libxml2 support.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/shr.el4
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 53db82cd5b..7184d3e71b 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-18 Glenn Morris <rgm@gnu.org>
+
+ * shr.el (libxml-parse-html-region): Declare.
+ (shr-render-buffer): Explicit error if no libxml2 support.
+
2013-06-17 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-current-line): New function.
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index 2d0c9107fd..06abde9e38 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -142,10 +142,14 @@ cid: URL as the argument.")
map))
;; Public functions and commands.
+(declare-function libxml-parse-html-region "xml.c"
+ (start end &optional base-url))
(defun shr-render-buffer (buffer)
"Display the HTML rendering of the current buffer."
(interactive (list (current-buffer)))
+ (or (fboundp 'libxml-parse-html-region)
+ (error "This function requires Emacs to be compiled with libxml2"))
(pop-to-buffer "*html*")
(erase-buffer)
(shr-insert-document