shr.el (shr-find-fill-point): Don't break a line before kinsoku-bol characters.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 2 Apr 2012 09:11:52 +0000 (09:11 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 2 Apr 2012 09:11:52 +0000 (09:11 +0000)
lisp/ChangeLog
lisp/shr.el

index 54930b3..5e14048 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-02  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * shr.el (shr-find-fill-point): Don't break a line before kinsoku-bol
+       characters.
+
 2012-03-27  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-sync.el (gnus-topic-alist, gnus-group-topic)
index b0cbc1b..4ee573f 100644 (file)
@@ -461,6 +461,13 @@ size, and full-buffer size."
               (if (looking-at "\\(\\c<+\\)\\c<")
                   (goto-char (match-end 1))
                 (forward-char 1)))))
+       ((shr-char-kinsoku-bol-p (following-char))
+        ;; Find forward the point where kinsoku-bol characters end.
+        (let ((count 4))
+          (while (and (>= (setq count (1- count)) 0)
+                      (shr-char-kinsoku-bol-p (following-char))
+                      (shr-char-breakable-p (following-char)))
+            (forward-char 1))))
        (t
         (if (shr-char-kinsoku-bol-p (preceding-char))
             ;; There are consecutive kinsoku-bol characters.