* lisp/net/newst-reader.el (newsticker-html-renderer): Default to SHR if
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 29 Nov 2013 21:35:00 +0000 (16:35 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 29 Nov 2013 21:35:00 +0000 (16:35 -0500)
available.  Suggested by Clément B. <barthele1u@etu.univ-lorraine.fr>.

lisp/ChangeLog
lisp/net/newst-reader.el

index b407739..26c0f50 100644 (file)
@@ -1,5 +1,8 @@
 2013-11-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * net/newst-reader.el (newsticker-html-renderer): Default to SHR if
+       available.  Suggested by Clément B. <barthele1u@etu.univ-lorraine.fr>.
+
        * uniquify.el (uniquify-buffer-name-style): Change default.
 
        * loadup.el: Preload "uniquify".
index 21bb890..4d2e011 100644 (file)
@@ -101,15 +101,18 @@ window is used when filling.  See also `newsticker-justification'."
   :group 'newsticker-reader)
 
 (defcustom newsticker-html-renderer
-  nil
+  (if (fboundp 'libxml-parse-html-region)
+      #'shr-render-region)
   "Function for rendering HTML contents.
 If non-nil, newsticker.el will call this function whenever it
-finds HTML-like tags in item descriptions.  Possible functions
-are `w3m-region', `w3-region', and `newsticker-htmlr-render'.
+finds HTML-like tags in item descriptions.  
+Possible functions include `shr-render-region', `w3m-region', `w3-region', and
+`newsticker-htmlr-render'.
 Newsticker automatically loads the respective package w3m, w3, or
 htmlr if this option is set."
   :type '(choice :tag "Function"
                  (const :tag "None" nil)
+                 (const :tag "SHR" shr-render-region)
                  (const :tag "w3" w3-region)
                  (const :tag "w3m" w3m-region)
                  (const :tag "htmlr" newsticker-htmlr-render))