2013-12-25 Lars Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-visit-file): Remove debugging function.
+ (shr-insert): Don't infloop if we can't find a good place to break
+ the line (bug#16256).
2013-12-25 Fabián Ezequiel Gallina <fgallina@gnu.org>
(insert elem)
(setq shr-state nil)
(let (found)
- (while (and (> (current-column) shr-width)
- (> shr-width 0)
- (progn
- (setq found (shr-find-fill-point))
- (not (eolp))))
+ (when (and (> (current-column) shr-width)
+ (progn
+ (setq found (shr-find-fill-point))
+ (not (eolp))))
(when (eq (preceding-char) ? )
(delete-char -1))
(insert "\n")
(not (memq (preceding-char) (list ?\C-@ ?\n ? )))
(or (shr-char-kinsoku-eol-p (preceding-char))
(shr-char-kinsoku-bol-p (following-char)))))))
- (if (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<")
- (goto-char (match-end 1))
- (forward-char 1))))
+ (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<")
+ (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))