From: Katsumi Yamaoka Date: Wed, 20 Oct 2010 00:44:28 +0000 (+0000) Subject: shr.el (shr-find-fill-point): Shorten line if the preceding char is kinsoku-eol regar... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~552 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9f47ba2d0f9f27031d57010354f8912711e6e561;p=emacs.git shr.el (shr-find-fill-point): Shorten line if the preceding char is kinsoku-eol regardless of shr-kinsoku-shorten. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4a7384a793e..9194c70be45 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2010-10-20 Katsumi Yamaoka + + * shr.el (shr-find-fill-point): Shorten line if the preceding char is + kinsoku-eol regardless of shr-kinsoku-shorten. + 2010-10-19 Lars Magne Ingebrigtsen * shr.el (shr-find-fill-point): Don't leave blanks at the start of some diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 98c473c1879..d7a5fb33f66 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -272,13 +272,19 @@ redirects somewhere else." ;; Don't put kinsoku-bol characters at the beginning of a line, ;; or kinsoku-eol characters at the end of a line, (let ((count 4)) - (if shr-kinsoku-shorten + (if (or shr-kinsoku-shorten + (and (aref (char-category-set (preceding-char)) ?<) + (progn + (setq count (1- count)) + (backward-char 1) + t))) (while (and - (> count 0) + (>= (setq count (1- count)) 0) + (not (memq (preceding-char) (list ?\C-@ ?\n ? ))) (or (aref (char-category-set (preceding-char)) ?<) (aref (char-category-set (following-char)) ?>))) (backward-char 1)) - (while (and (> count 0) + (while (and (>= (setq count (1- count)) 0) (aref (char-category-set (following-char)) ?>)) (forward-char 1))) (when (eq (following-char) ? )