[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] shr-fontified b0e3d92 3/9: (shr-fold-line): Handle lines t
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] shr-fontified b0e3d92 3/9: (shr-fold-line): Handle lines that end with a space at the fill point. |
Date: |
Mon, 09 Feb 2015 10:39:08 +0000 |
branch: shr-fontified
commit b0e3d921d77d7964662f3e066a9761a97fd48bc0
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>
(shr-fold-line): Handle lines that end with a space at the fill point.
---
lisp/ChangeLog | 1 +
lisp/net/shr.el | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a92f854..821a6e0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,7 @@
2015-02-09 Lars Ingebrigtsen <address@hidden>
* net/shr.el (shr-fold-line): Indent <li> properly.
+ (shr-fold-line): Handle lines that end with a space at the fill point.
2015-02-08 Lars Ingebrigtsen <address@hidden>
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 9a7febb..beea267 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -512,7 +512,6 @@ size, and full-buffer size."
(unless (= start (point))
;; Mark all lines that should possibly be folded afterwards.
(when bolp
- (shr-indent)
(shr-mark-fill start))
(when shr-use-fonts
(add-face-text-property start (point)
@@ -549,6 +548,8 @@ size, and full-buffer size."
(shr-indent)
(setq shr-indentation (or continuation shr-indentation))
(shr-vertical-motion shr-internal-width)
+ (when (looking-at " $")
+ (delete-region (point) (line-end-position)))
(while (not (eolp))
;; We have to do some folding. First find the first
;; previous point suitable for folding.
@@ -564,7 +565,9 @@ size, and full-buffer size."
;; Success; continue.
(insert "\n")
(shr-indent)
- (shr-vertical-motion shr-internal-width)))))
+ (shr-vertical-motion shr-internal-width)
+ (when (looking-at " $")
+ (delete-region (point) (line-end-position)))))))
(defun shr-find-fill-point (start)
(let ((bp (point))
- [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 <=
- [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, 2015/02/09
- [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