gnus-html.el (gnus-html-wash-tags, gnus-html-put-image): Mark cid and internal images...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 7 Sep 2010 06:20:08 +0000 (06:20 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 7 Sep 2010 06:20:08 +0000 (06:20 +0000)
lisp/ChangeLog
lisp/gnus-html.el

index d65ddfd..414d7aa 100644 (file)
@@ -1,5 +1,8 @@
 2010-09-07  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * gnus-html.el (gnus-html-wash-tags, gnus-html-put-image): Mark cid and
+       internal images as deletable by `W D D'.
+
        * gnus-async.el (gnus-html-prefetch-images): Autoload it when compiling.
        (gnus-async-article-callback): Fix typo.
 
index 034d65e..bf9f0cd 100644 (file)
@@ -150,7 +150,8 @@ fit these criteria."
                (when image
                  (let ((string (buffer-substring start end)))
                    (delete-region start end)
-                   (gnus-put-image image (gnus-string-or string "*")))))
+                   (gnus-put-image image (gnus-string-or string "*") 'cid)
+                   (gnus-add-image 'cid image))))
            ;; Normal, external URL.
            (if (gnus-html-image-url-blocked-p
                 url
@@ -309,9 +310,11 @@ fit these criteria."
              t)
          (insert string)
          (when (fboundp 'find-image)
-           (gnus-put-image (find-image
-                            '((:type xpm :file "lock-broken.xpm")))
-                           (gnus-string-or string "*")))
+           (setq image (find-image '((:type xpm :file "lock-broken.xpm"))))
+           (gnus-put-image image
+                           (gnus-string-or string "*")
+                           'internal)
+           (gnus-add-image 'internal image))
          nil)))))
 
 (defun gnus-html-rescale-image (image file size)