+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.
("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)
(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