1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

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.
This commit is contained in:
Lars Magne Ingebrigtsen 2016-03-20 12:54:24 +01:00
parent 35d58020b6
commit c688c44ddf

View file

@ -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)