Shorten ALT texts and allow them to be line-broken.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 5 Oct 2010 19:18:48 +0000 (21:18 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 5 Oct 2010 19:18:48 +0000 (21:18 +0200)
lisp/ChangeLog
lisp/shr.el

index 68d2ddf..16422ae 100644 (file)
@@ -1,5 +1,8 @@
 2010-10-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2010-10-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * shr.el (shr-tag-img): Shorten ALT texts and allow them to be
+       line-broken.
+
        * mm-decode.el (mm-shr): Require shr.
 
        * gnus-art.el (gnus-blocked-images): Move variable here.
        * mm-decode.el (mm-shr): Require shr.
 
        * gnus-art.el (gnus-blocked-images): Move variable here.
index 9318740..e3ca2fb 100644 (file)
@@ -222,7 +222,10 @@ redirects somewhere else."
            (and shr-blocked-images
                 (string-match shr-blocked-images url)))
        (setq shr-start (point))
            (and shr-blocked-images
                 (string-match shr-blocked-images url)))
        (setq shr-start (point))
-       (insert alt))
+       (let ((shr-state 'space))
+         (if (> (length alt) 8)
+             (shr-insert (substring alt 0 8))
+           (shr-insert alt))))
        ((url-is-cached (browse-url-url-encode-chars url "[&)$ ]"))
        (shr-put-image (shr-get-image-data url) (point) alt))
        (t
        ((url-is-cached (browse-url-url-encode-chars url "[&)$ ]"))
        (shr-put-image (shr-get-image-data url) (point) alt))
        (t