From 2dcbc9ada5ed5213959b54678a333e5d7ad4d4f8 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Mon, 2 Apr 2012 09:11:52 +0000 Subject: [PATCH] shr.el (shr-find-fill-point): Don't break a line before kinsoku-bol characters. --- lisp/ChangeLog | 5 +++++ lisp/shr.el | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54930b386..5e14048e1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-04-02 Katsumi Yamaoka + + * shr.el (shr-find-fill-point): Don't break a line before kinsoku-bol + characters. + 2012-03-27 Katsumi Yamaoka * gnus-sync.el (gnus-topic-alist, gnus-group-topic) diff --git a/lisp/shr.el b/lisp/shr.el index b0cbc1b77..4ee573f0c 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -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. -- 2.25.1