From: Lars Magne Ingebrigtsen Date: Sun, 20 Mar 2016 11:54:24 +0000 (+0100) Subject: Remove code left over from when overlays were used for padding X-Git-Tag: emacs-26.0.90~2332 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c688c44ddfda28ac94dec2ad57c5ca3ed263ff1d;p=emacs.git 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. --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 6bb6898188d..0a7ea14b252 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)