diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2013-12-27 03:58:16 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2013-12-27 03:58:16 +0100 |
commit | 24a6b65e905fe25355fd65a1cf1fff501ba28352 (patch) | |
tree | af2255aaa46c613d907a17d9a49f51835dafc435 /lisp/net | |
parent | ac5758d16288422dc7c91f152db612deb44ff3a7 (diff) | |
download | emacs-24a6b65e905fe25355fd65a1cf1fff501ba28352.tar.gz |
Fix another shr infloop in the filling code
(shr-find-fill-point): Off by one error in comparison with the
indentation.
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/shr.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index a4cfdfeb0c1..1a555100a21 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -478,7 +478,7 @@ size, and full-buffer size." (backward-char 1)) (let ((bp (point)) failed) - (while (not (or (setq failed (< (current-column) shr-indentation)) + (while (not (or (setq failed (<= (current-column) shr-indentation)) (eq (preceding-char) ? ) (eq (following-char) ? ) (shr-char-breakable-p (preceding-char)) @@ -486,7 +486,8 @@ size, and full-buffer size." (and (shr-char-kinsoku-bol-p (preceding-char)) (shr-char-breakable-p (following-char)) (not (shr-char-kinsoku-bol-p (following-char)))) - (shr-char-kinsoku-eol-p (following-char)))) + (shr-char-kinsoku-eol-p (following-char)) + (bolp))) (backward-char 1)) (if failed ;; There's no breakable point, so we give it up. @@ -508,7 +509,7 @@ size, and full-buffer size." (while (and (not (memq (preceding-char) (list ?\C-@ ?\n ? ))) (shr-char-kinsoku-eol-p (preceding-char))) (backward-char 1)) - (when (setq failed (< (current-column) shr-indentation)) + (when (setq failed (<= (current-column) shr-indentation)) ;; There's no breakable point that doesn't violate kinsoku, ;; so we look for the second best position. (while (and (progn @@ -528,7 +529,7 @@ size, and full-buffer size." (not (memq (preceding-char) (list ?\C-@ ?\n ? ))) (or (shr-char-kinsoku-eol-p (preceding-char)) (shr-char-kinsoku-bol-p (following-char))))))) - (when (setq failed (< (current-column) shr-indentation)) + (when (setq failed (<= (current-column) shr-indentation)) ;; There's no breakable point that doesn't violate kinsoku, ;; so we go to the second best position. (if (looking-at "\\(\\c<+\\)\\c<") |