[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] shr-fontified 8180e53 7/9: (shr-fold-line): Keep breaking
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] shr-fontified 8180e53 7/9: (shr-fold-line): Keep breaking unbreakable text. |
Date: |
Mon, 09 Feb 2015 10:39:10 +0000 |
branch: shr-fontified
commit 8180e5355ff387e2ad7366d91c2e3003faa713ff
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>
(shr-fold-line): Keep breaking unbreakable text.
---
lisp/ChangeLog | 1 +
lisp/net/shr.el | 14 +++++++-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cec4409..fb00cd6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -7,6 +7,7 @@
folded.
(shr-insert-table): Get colspan pro-rating right by distributing
the zero-length columns in the right place.
+ (shr-fold-line): Keep breaking unbreakable text.
2015-02-08 Lars Ingebrigtsen <address@hidden>
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 3db79f0..7a0c420 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -560,16 +560,16 @@ size, and full-buffer size."
(while (not (eolp))
;; We have to do some folding. First find the first
;; previous point suitable for folding.
- (shr-find-fill-point (line-beginning-position))
- (when (= (preceding-char) ?\s)
- (delete-char -1))
- (if (or (bolp)
- (= (- (point) (line-beginning-position)) 1))
- ;; We had unbreakable text, so just give up and stop folding.
+ (if (not (shr-find-fill-point (line-beginning-position)))
+ ;; We had unbreakable text (for this width), so just go to
+ ;; the first space and carry on.
(progn
+ (beginning-of-line)
(shr-indent)
- (end-of-line))
+ (search-forward " " (line-end-position) t))
;; Success; continue.
+ (when (= (preceding-char) ?\s)
+ (delete-char -1))
(insert "\n")
(shr-indent)
(shr-vertical-motion shr-internal-width)
- [Emacs-diffs] shr-fontified updated (70199c1 -> 35d95a2), Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 1376a51 2/9: shr/Gnus face fixup and <li> rendering fix, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified fe9660e 1/9: Rework the indentation to work more generally, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified b0e3d92 3/9: (shr-fold-line): Handle lines that end with a space at the fill point., Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 217e202 5/9: Further colspan fixes, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 659202a 6/9: Fix up last change to really get colspans right, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 8180e53 7/9: (shr-fold-line): Keep breaking unbreakable text.,
Lars Ingebrigtsen <=
- [Emacs-diffs] shr-fontified 1d5d72e 4/9: shr filling fix-ups, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 25f55f7 8/9: Don't infloop on unbreakable, indented lines, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 35d95a2 9/9: (shr-insert-table): Expand table alignments in any buffer at the end., Lars Ingebrigtsen, 2015/02/09