T-gnus 6.15.24 revision 00.
[elisp/gnus.git-] / lisp / mm-view.el
index b569247..4fba52b 100644 (file)
@@ -1,5 +1,5 @@
 ;;; mm-view.el --- functions for viewing MIME objects
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; This file is part of GNU Emacs.
@@ -47,7 +47,7 @@
           mm-links-remove-leading-blank
           "links" "-dump" file)
     (lynx  mm-inline-render-with-stdin nil
-          "lynx" "-dump" "-force_html" "-stdin")
+          "lynx" "-dump" "-force_html" "-stdin" "-nolist")
     (html2text  mm-inline-render-with-function html2text))
   "The attributes of renderer types for text/html.")
 
@@ -60,7 +60,7 @@
           mm-links-remove-leading-blank
           "links" "-dump" file)
     (lynx  mm-inline-wash-with-stdin nil
-          "lynx" "-dump" "-force_html" "-stdin")
+          "lynx" "-dump" "-force_html" "-stdin" "-nolist")
     (html2text  html2text))
   "The attributes of washer types for text/html.")
 
     (unless (assq 'gnus-article-mode w3m-cid-retrieve-function-alist)
       (push (cons 'gnus-article-mode 'mm-w3m-cid-retrieve)
            w3m-cid-retrieve-function-alist))
-    (setq mm-w3m-setup t)))
+    (setq mm-w3m-setup t))
+  (setq w3m-display-inline-images mm-inline-text-html-with-images))
 
 (defun mm-w3m-cid-retrieve (url &rest args)
   "Insert a content pointed by URL if it has the cid: scheme."
@@ -248,7 +249,6 @@ map.")))
          (delete-region (point-min) (point-max))
          (insert (mm-decode-string text charset)))
        (let ((w3m-safe-url-regexp mm-w3m-safe-url-regexp)
-             (w3m-display-inline-images mm-inline-text-html-with-images)
              w3m-force-redisplay)
          (w3m-region (point-min) (point-max)))
        (when mm-inline-text-html-with-w3m-keymap
@@ -327,7 +327,7 @@ map.")))
     (if entry
        (setq func (cdr entry)))
     (cond
-     ((gnus-functionp func)
+     ((functionp func)
       (funcall func handle))
      (t
       (apply (car func) handle (cdr func))))))
@@ -558,8 +558,10 @@ map.")))
   (sit-for 1)
   t)
 
+(autoload 'gnus-completing-read-maybe-default "gnus-util" nil nil 'macro)
+
 (defun mm-view-pkcs7-decrypt (handle)
-  (insert-buffer (mm-handle-buffer handle))
+  (insert-buffer-substring (mm-handle-buffer handle))
   (goto-char (point-min))
   (insert "MIME-Version: 1.0\n")
   (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m")
@@ -568,7 +570,7 @@ map.")))
    (if (= (length smime-keys) 1)
        (cadar smime-keys)
      (smime-get-key-by-email
-      (completing-read
+      (gnus-completing-read-maybe-default
        (concat "Decipher using which key? "
               (if smime-keys (concat "(default " (caar smime-keys) ") ")
                 ""))