Inline application/emacs-lisp.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 16 Sep 2000 00:16:17 +0000 (00:16 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 16 Sep 2000 00:16:17 +0000 (00:16 +0000)
lisp/ChangeLog
lisp/mm-decode.el
lisp/mm-view.el

index 310c2a8..279e78f 100644 (file)
@@ -1,3 +1,13 @@
+2000-09-15 21:10:20  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * mm-decode.el (mm-inlined-types): Add application/emacs-lisp.
+       (mm-inline-media-tests): Ditto.
+       (mm-automatic-display): Ditto.
+       * mm-view.el (mm-display-inline-fontify): Generalize from 
+       mm-display-patch-inline. 
+       (mm-display-patch-inline): Use it.
+       (mm-display-elisp-inline): Ditto.
+       
 2000-09-15 14:03:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-topic.el (gnus-topic-find-groups): Add recursive parameter.
index 74f0a75..f2ab1b0 100644 (file)
     ("text/x-patch" mm-display-patch-inline
      (lambda (handle)
        (locate-library "diff-mode")))
+    ("application/emacs-lisp" mm-display-elisp-inline identity)
     ("text/html"
      mm-inline-text
      (lambda (handle)
 
 (defcustom mm-inlined-types
   '("image/.*" "text/.*" "message/delivery-status" "message/rfc822"
-    "message/partial"
+    "message/partial" "application/emacs-lisp"
     "application/pgp-signature")
   "List of media types that are to be displayed inline."
   :type '(repeat string)
 (defcustom mm-automatic-display
   '("text/plain" "text/enriched" "text/richtext" "text/html"
     "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
-    "message/rfc822" "text/x-patch" "application/pgp-signature")
+    "message/rfc822" "text/x-patch" "application/pgp-signature" 
+    "application/emacs-lisp")
   "A list of MIME types to be displayed automatically."
   :type '(repeat string)
   :group 'mime-display)
index 45ed4d2..5bf4f09 100644 (file)
                (error nil))
              (delete-region ,(point-min-marker) ,(point-max-marker)))))))))
 
-(defun mm-display-patch-inline (handle)
+(defun mm-display-inline-fontify (handle mode)
   (let (text)
     (with-temp-buffer
       (mm-insert-part handle)
-      (diff-mode)
+      (funcall mode)
       (font-lock-fontify-buffer)
       (when (fboundp 'extent-list)
        (map-extents (lambda (ext ignored)
       (setq text (buffer-string)))
     (mm-insert-inline handle text)))
 
+(defun mm-display-patch-inline (handle)
+  (mm-display-inline-fontify handle 'diff-mode))
+
+(defun mm-display-elisp-inline (handle)
+  (mm-display-inline-fontify handle 'emacs-lisp-mode))
+
 (provide 'mm-view)
 
 ;; mm-view.el ends here