aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2016-03-20 12:54:24 +0100
committerLars Magne Ingebrigtsen2016-03-20 12:54:24 +0100
commitc688c44ddfda28ac94dec2ad57c5ca3ed263ff1d (patch)
tree5e60703ede9c61fddd6fcee84fde95b525ca504c
parent35d58020b6e173b137429786d174ffdb8894a812 (diff)
downloademacs-c688c44ddfda28ac94dec2ad57c5ca3ed263ff1d.tar.gz
emacs-c688c44ddfda28ac94dec2ad57c5ca3ed263ff1d.zip
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.
-rw-r--r--lisp/net/shr.el26
1 files changed, 0 insertions, 26 deletions
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
275 (shr-descend dom) 275 (shr-descend dom)
276 (shr-fill-lines start (point)) 276 (shr-fill-lines start (point))
277 (shr--remove-blank-lines-at-the-end start (point)) 277 (shr--remove-blank-lines-at-the-end start (point))
278 (shr-remove-trailing-whitespace start (point))
279 (when shr-warning 278 (when shr-warning
280 (message "%s" shr-warning)))) 279 (message "%s" shr-warning))))
281 280
@@ -292,19 +291,6 @@ DOM should be a parse tree as generated by
292 (unless (bolp) 291 (unless (bolp)
293 (insert "\n")))))) 292 (insert "\n"))))))
294 293
295(defun shr-remove-trailing-whitespace (start end)
296 (let ((width (window-width)))
297 (save-restriction
298 (narrow-to-region start end)
299 (goto-char start)
300 (while (not (eobp))
301 (end-of-line)
302 (when (> (shr-previous-newline-padding-width (current-column)) width)
303 (dolist (overlay (overlays-at (point)))
304 (when (overlay-get overlay 'before-string)
305 (overlay-put overlay 'before-string nil))))
306 (forward-line 1)))))
307
308(defun shr-copy-url (&optional image-url) 294(defun shr-copy-url (&optional image-url)
309 "Copy the URL under point to the kill ring. 295 "Copy the URL under point to the kill ring.
310If IMAGE-URL (the prefix) is non-nil, or there is no link under 296If 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."
1172 t))) 1158 t)))
1173 new-colors))) 1159 new-colors)))
1174 1160
1175(defun shr-previous-newline-padding-width (width)
1176 (let ((overlays (overlays-at (point)))
1177 (previous-width 0))
1178 (if (null overlays)
1179 width
1180 (dolist (overlay overlays)
1181 (setq previous-width
1182 (+ previous-width
1183 (length (plist-get (overlay-properties overlay)
1184 'before-string)))))
1185 (+ width previous-width))))
1186
1187;;; Tag-specific rendering rules. 1161;;; Tag-specific rendering rules.
1188 1162
1189(defun shr-tag-html (dom) 1163(defun shr-tag-html (dom)