[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115752: Don't infloop when we can't find a good pla
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] trunk r115752: Don't infloop when we can't find a good place to break lines in shr |
Date: |
Wed, 25 Dec 2013 22:58:13 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115752
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16256
committer: Lars Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Wed 2013-12-25 23:52:15 +0100
message:
Don't infloop when we can't find a good place to break lines in shr
(shr-insert): Don't infloop if we can't find a good place to break
the line.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/net/shr.el shr.el-20101002102929-yfzewk55rsg0mn93-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-12-25 22:57:00 +0000
+++ b/lisp/ChangeLog 2013-12-25 22:52:15 +0000
@@ -12,6 +12,8 @@
2013-12-25 Lars Ingebrigtsen <address@hidden>
* 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 <address@hidden>
=== modified file 'lisp/net/shr.el'
--- a/lisp/net/shr.el 2013-12-25 19:37:41 +0000
+++ b/lisp/net/shr.el 2013-12-25 22:52:15 +0000
@@ -455,11 +455,10 @@
(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")
@@ -528,12 +527,12 @@
(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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115752: Don't infloop when we can't find a good place to break lines in shr,
Lars Ingebrigtsen <=