+2012-02-07 Lars Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-remove-trailing-whitespace): Don't strip whitespace from
+ lines that are narrower than the window width. Otherwise background
+ "blocks" will look less readable.
+
2012-02-07 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-sum.el (gnus-summary-show-thread): Revert last two changes.
(shr-remove-trailing-whitespace start (point))))
(defun shr-remove-trailing-whitespace (start end)
- (save-restriction
- (narrow-to-region start end)
- (delete-trailing-whitespace)
- (goto-char start)
- (while (not (eobp))
- (end-of-line)
- (dolist (overlay (overlays-at (point)))
- (when (overlay-get overlay 'before-string)
- (overlay-put overlay 'before-string nil)))
- (forward-line 1))))
+ (let ((width (window-width)))
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char start)
+ (while (not (eobp))
+ (end-of-line)
+ (when (> (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 ()
"Copy the URL under point to the kill ring.