[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master c688c44 2/5: Remove code left over from when overla
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master c688c44 2/5: Remove code left over from when overlays were used for padding |
Date: |
Sun, 20 Mar 2016 12:43:50 +0000 |
branch: master
commit c688c44ddfda28ac94dec2ad57c5ca3ed263ff1d
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>
Remove code left over from when overlays were used for padding
* lisp/net/shr.el (shr-previous-newline-padding-width): Remove.
(shr-remove-trailing-whitespace): Ditto.
(shr-insert-document): Don't call them.
---
lisp/net/shr.el | 26 --------------------------
1 files changed, 0 insertions(+), 26 deletions(-)
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 6bb6898..0a7ea14 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -275,7 +275,6 @@ DOM should be a parse tree as generated by
(shr-descend dom)
(shr-fill-lines start (point))
(shr--remove-blank-lines-at-the-end start (point))
- (shr-remove-trailing-whitespace start (point))
(when shr-warning
(message "%s" shr-warning))))
@@ -292,19 +291,6 @@ DOM should be a parse tree as generated by
(unless (bolp)
(insert "\n"))))))
-(defun shr-remove-trailing-whitespace (start end)
- (let ((width (window-width)))
- (save-restriction
- (narrow-to-region start end)
- (goto-char start)
- (while (not (eobp))
- (end-of-line)
- (when (> (shr-previous-newline-padding-width (current-column)) width)
- (dolist (overlay (overlays-at (point)))
- (when (overlay-get overlay 'before-string)
- (overlay-put overlay 'before-string nil))))
- (forward-line 1)))))
-
(defun shr-copy-url (&optional image-url)
"Copy the URL under point to the kill ring.
If IMAGE-URL (the prefix) is non-nil, or there is no link under
@@ -1172,18 +1158,6 @@ ones, in case fg and bg are nil."
t)))
new-colors)))
-(defun shr-previous-newline-padding-width (width)
- (let ((overlays (overlays-at (point)))
- (previous-width 0))
- (if (null overlays)
- width
- (dolist (overlay overlays)
- (setq previous-width
- (+ previous-width
- (length (plist-get (overlay-properties overlay)
- 'before-string)))))
- (+ width previous-width))))
-
;;; Tag-specific rendering rules.
(defun shr-tag-html (dom)