Allow customizing the <li> "bullet"
authorRĂ¼diger Sonderfeld <ruediger@c-plusplus.de>
Sun, 16 Jun 2013 14:19:38 +0000 (16:19 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 16 Jun 2013 14:19:38 +0000 (16:19 +0200)
(shr-bullet): New custom variable.
(shr-tag-li): Support custom bullet in unordered lists.

lisp/ChangeLog
lisp/shr.el

index 2b2b63c..b538076 100644 (file)
@@ -2,6 +2,8 @@
 
        * shr.el (shr-dom-to-xml): (shr-dom-to-xml): New function.
        (shr-tag-svg): Add support for the SVG tag.
+       (shr-bullet): New custom variable.
+       (shr-tag-li): Support custom bullet in unordered lists.
 
 2013-06-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
index 5173908..7f79e1a 100644 (file)
@@ -83,6 +83,14 @@ used."
                 (const   :tag "Use the width of the window" nil))
   :group 'shr)
 
+(defcustom shr-bullet "* "
+  "Bullet used for unordered lists.
+Alternative suggestions are:
+- \"  \"
+- \"  \""
+  :type 'string
+  :group 'shr)
+
 (defvar shr-content-function nil
   "If bound, this should be a function that will return the content.
 This is used for cid: URLs, and the function is called with the
@@ -1128,7 +1136,7 @@ ones, in case fg and bg are nil."
              (prog1
                  (format "%d " shr-list-mode)
                (setq shr-list-mode (1+ shr-list-mode)))
-           "* "))
+           shr-bullet))
         (shr-indentation (+ shr-indentation (length bullet))))
     (insert bullet)
     (shr-generic cont)))