2002-01-01 Steve Youngs <youngs@xemacs.org>
[gnus] / lisp / mm-decode.el
index c44a663..54f61ec 100644 (file)
      (lambda (handle)
        (locate-library "diff-mode")))
     ("application/emacs-lisp" mm-display-elisp-inline identity)
+    ("application/x-emacs-lisp" mm-display-elisp-inline identity)
     ("text/html"
      mm-inline-text
      (lambda (handle)
@@ -226,7 +227,9 @@ when selecting a different article."
 
 (defcustom mm-attachment-override-types '("text/x-vcard"
                                          "application/pkcs7-mime"
-                                         "application/x-pkcs7-mime")
+                                         "application/x-pkcs7-mime"
+                                         "application/pkcs7-signature"
+                                         "application/x-pkcs7-signature")
   "Types to have \"attachment\" ignored if they can be displayed inline."
   :type '(repeat string)
   :group 'mime-display)
@@ -293,7 +296,7 @@ Each function takes a file name as input and returns a file name.")
 (defcustom mm-default-directory nil
   "The default directory where mm will save files.
 If not set, `default-directory' will be used."
-  :type 'directory
+  :type '(choice directory (const :tag "Default" nil))
   :group 'mime-display)
 
 (defcustom mm-external-terminal-program "xterm"
@@ -1108,30 +1111,33 @@ be determined."
                                        (or (mm-image-type-from-buffer)
                                            (intern type))
                                        'data-p)
-                       (cond
-                        ((equal type "xbm")
-                         ;; xbm images require special handling, since
-                         ;; the only way to create glyphs from these
-                         ;; (without a ton of work) is to write them
-                         ;; out to a file, and then create a file
-                         ;; specifier.
-                         (let ((file (make-temp-name
-                                      (expand-file-name "emm.xbm"
-                                                        mm-tmp-directory))))
-                           (unwind-protect
-                               (progn
-                                 (write-region (point-min) (point-max) file)
-                                 (make-glyph (list (cons 'x file))))
-                             (ignore-errors
-                               (delete-file file)))))
-                        (t
-                         (make-glyph
-                          (vector 
-                           (or (mm-image-type-from-buffer)
-                               (intern type))
-                           :data (buffer-string))))))))
+                       (mm-create-image-xemacs type))))
            (mm-handle-set-cache handle spec))))))
 
+(defun mm-create-image-xemacs (type)
+  (cond
+   ((equal type "xbm")
+    ;; xbm images require special handling, since
+    ;; the only way to create glyphs from these
+    ;; (without a ton of work) is to write them
+    ;; out to a file, and then create a file
+    ;; specifier.
+    (let ((file (make-temp-name
+                (expand-file-name "emm.xbm"
+                                  mm-tmp-directory))))
+      (unwind-protect
+         (progn
+           (write-region (point-min) (point-max) file)
+           (make-glyph (list (cons 'x file))))
+       (ignore-errors
+         (delete-file file)))))
+   (t
+    (make-glyph
+     (vector 
+      (or (mm-image-type-from-buffer)
+         (intern type))
+      :data (buffer-string))))))
+  
 (defun mm-image-fit-p (handle)
   "Say whether the image in HANDLE will fit the current window."
   (let ((image (mm-get-image handle)))