shr: Render td content with shr-descend
[gnus] / lisp / mm-view.el
index 5866b81..083781b 100644 (file)
 
 (defvar mm-text-html-renderer-alist
   '((shr . mm-shr)
-    (w3  . mm-inline-text-html-render-with-w3)
+    (w3 . mm-inline-text-html-render-with-w3)
     (w3m . mm-inline-text-html-render-with-w3m)
     (w3m-standalone . mm-inline-text-html-render-with-w3m-standalone)
     (gnus-w3m . gnus-article-html)
     (links mm-inline-render-with-file
           mm-links-remove-leading-blank
           "links" "-dump" file)
-    (lynx  mm-inline-render-with-stdin nil
-          "lynx" "-dump" "-force_html" "-stdin" "-nolist")
-    (html2text  mm-inline-render-with-function html2text))
+    (lynx mm-inline-render-with-stdin nil
+         "lynx" "-dump" "-force_html" "-stdin" "-nolist")
+    (html2text mm-inline-render-with-function html2text))
   "The attributes of renderer types for text/html.")
 
-(defvar mm-text-html-washer-alist
-  '((w3  . gnus-article-wash-html-with-w3)
-    (w3m . gnus-article-wash-html-with-w3m)
-    (w3m-standalone . gnus-article-wash-html-with-w3m-standalone)
-    (links mm-inline-wash-with-file
-          mm-links-remove-leading-blank
-          "links" "-dump" file)
-    (lynx  mm-inline-wash-with-stdin nil
-          "lynx" "-dump" "-force_html" "-stdin" "-nolist")
-    (html2text  html2text))
-  "The attributes of washer types for text/html.")
-
 (defcustom mm-fill-flowed t
   "If non-nil a format=flowed article will be displayed flowed."
   :type 'boolean
@@ -94,6 +82,8 @@
 ;;; Functions for displaying various formats inline
 ;;;
 
+(autoload 'gnus-rescale-image "gnus-util")
+
 (defun mm-inline-image-emacs (handle)
   (let ((b (point-marker))
        (inhibit-read-only t))
          (t
           (error "Could not identify PKCS#7 type")))))
 
-(defun mm-view-pkcs7 (handle)
+(defun mm-view-pkcs7 (handle &optional from)
   (case (mm-view-pkcs7-get-type handle)
-    (enveloped (mm-view-pkcs7-decrypt handle))
+    (enveloped (mm-view-pkcs7-decrypt handle from))
     (signed (mm-view-pkcs7-verify handle))
     (otherwise (error "Unknown or unimplemented PKCS#7 type"))))
 
     (replace-match "\n"))
   t)
 
-(defun mm-view-pkcs7-decrypt (handle)
+(defun mm-view-pkcs7-decrypt (handle &optional from)
   (insert-buffer-substring (mm-handle-buffer handle))
   (goto-char (point-min))
   (insert "MIME-Version: 1.0\n")
      (smime-get-key-by-email
       (gnus-completing-read
        "Decipher using key"
-       smime-keys nil nil nil (car-safe (car-safe smime-keys))))))
+       smime-keys nil nil nil (car-safe (car-safe smime-keys)))))
+   from)
   (goto-char (point-min))
   (while (search-forward "\r\n" nil t)
     (replace-match "\n"))