diff lisp/gnus/shr.el @ 110757:d3001fd75795

shr.el (shr-tag-li): Get <li> indentation right. shr.el (shr-tag-li): Get <li> indentation even righter. shr.el (shr-tag-blockquote): Ensure paragraph start.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 04 Oct 2010 13:17:48 +0000
parents 9070b77b4a28
children 0fe64d68a522
line wrap: on
line diff
--- a/lisp/gnus/shr.el	Mon Oct 04 10:43:14 2010 +0000
+++ b/lisp/gnus/shr.el	Mon Oct 04 13:17:48 2010 +0000
@@ -220,6 +220,7 @@
     (shr-ensure-newline)))
 
 (defun shr-tag-blockquote (cont)
+  (shr-ensure-paragraph)
   (let ((shr-indentation (+ shr-indentation 4)))
     (shr-generic cont)))
 
@@ -289,12 +290,15 @@
 
 (defun shr-tag-li (cont)
   (shr-ensure-newline)
-  (if (numberp shr-list-mode)
-      (progn
-	(insert (format "%d " shr-list-mode))
-	(setq shr-list-mode (1+ shr-list-mode)))
-    (insert "* "))
-  (shr-generic cont))
+  (let* ((bullet
+	  (if (numberp shr-list-mode)
+	      (prog1
+		  (format "%d " shr-list-mode)
+		(setq shr-list-mode (1+ shr-list-mode)))
+	    "* "))
+	 (shr-indentation (+ shr-indentation (length bullet))))
+    (insert bullet)
+    (shr-generic cont)))
 
 (defun shr-tag-br (cont)
   (unless (bobp)