Shorten ALT texts and allow them to be line-broken.
[gnus] / lisp / shr.el
index fe22813..e3ca2fb 100644 (file)
@@ -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
@@ -460,7 +463,7 @@ Return a string with image data."
        (goto-char start)
        (let ((lines (split-string (nth 2 column) "\n"))
              (overlay-lines (nth 3 column))
-             overlay)
+             overlay overlay-line)
          (dolist (line lines)
            (setq overlay-line (pop overlay-lines))
            (when (> (length line) 0)