summaryrefslogtreecommitdiff
path: root/lisp/gnus/shr.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2012-02-07 22:17:11 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2012-02-07 22:17:11 +0000
commit7c4bbb6992b443b0ce569d111fc167ad753e912c (patch)
tree4041ace40581d71bea3c2c63ac6f2927403a7462 /lisp/gnus/shr.el
parent5e0d957fe021bc921bfa4f7568f5501c43ca7fc5 (diff)
downloademacs-7c4bbb6992b443b0ce569d111fc167ad753e912c.tar.gz
emacs-7c4bbb6992b443b0ce569d111fc167ad753e912c.tar.bz2
emacs-7c4bbb6992b443b0ce569d111fc167ad753e912c.zip
Merge changes made in No Gnus
gnus.texi (Mail Source Specifiers): Add a pop3 via an SSH tunnel example (modified from an example by Michael Albinus). 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.
Diffstat (limited to 'lisp/gnus/shr.el')
-rw-r--r--lisp/gnus/shr.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index deaef1d3f25..7af8e31f792 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -153,16 +153,17 @@ DOM should be a parse tree as generated by
(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.