From: Lars Magne Ingebrigtsen Date: Tue, 5 Oct 2010 19:18:48 +0000 (+0200) Subject: Shorten ALT texts and allow them to be line-broken. X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=4c94d8ab77dea518e07526bd19eb7c1c9245adc9;hp=2e7157f545dab4c5aefe05c1737d71f1a4d5c739 Shorten ALT texts and allow them to be line-broken. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 68d2ddf4e..16422aeb1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-10-05 Lars Magne Ingebrigtsen + * 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. diff --git a/lisp/shr.el b/lisp/shr.el index 9318740af..e3ca2fb7e 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -222,7 +222,10 @@ redirects somewhere else." (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