]> git.eshelyaron.com Git - emacs.git/commitdiff
shr.el (shr-tag-img): Use string-width and truncate-string-to-width to measure the...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 4 Nov 2010 11:00:25 +0000 (11:00 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 4 Nov 2010 11:00:25 +0000 (11:00 +0000)
lisp/gnus/ChangeLog
lisp/gnus/shr.el

index 43ec85c8879a12b176d579df110a5952822b101a..aff887fb77017c39d02147d192e8a367b32059c3 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-04  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * shr.el (shr-tag-img): Use string-width and truncate-string-to-width
+       to measure the length and truncate alt text.
+
 2010-11-03  Glenn Morris  <rgm@gnu.org>
 
        * nndiary.el (nndiary-generate-nov-databases-1)
index cc3855bed04c5357afab9ee5d081965e320fed95..5614e72f5181925d3aff52a16bec40511b726248 100644 (file)
@@ -551,8 +551,8 @@ Return a string with image data."
                   (string-match shr-blocked-images url)))
          (setq shr-start (point))
          (let ((shr-state 'space))
-           (if (> (length alt) 8)
-               (shr-insert (substring alt 0 8))
+           (if (> (string-width alt) 8)
+               (shr-insert (truncate-string-to-width alt 8))
              (shr-insert alt))))
         ((url-is-cached (shr-encode-url url))
          (shr-put-image (shr-get-image-data url) alt))