+(eval-when-compile (require 'cl))
+(require 'mail-parse)
+(require 'nnheader)
+(require 'mm-decode)
+(require 'gnus-mailcap)
+(require 'mml2015)
+
+(autoload 'uudecode-decode-region "uudecode")
+(autoload 'uudecode-decode-region-external "uudecode")
+(autoload 'uudecode-decode-region-internal "uudecode")
+
+(autoload 'binhex-decode-region "binhex")
+(autoload 'binhex-decode-region-external "binhex")
+(autoload 'binhex-decode-region-internal "binhex")
+
+(autoload 'yenc-decode-region "yenc")
+(autoload 'yenc-extract-filename "yenc")
+
+(defcustom mm-uu-decode-function 'uudecode-decode-region
+ "*Function to uudecode.
+Internal function is done in Lisp by default, therefore decoding may
+appear to be horribly slow. You can make Gnus use an external
+decoder, such as uudecode."
+ :type '(choice
+ (function-item :tag "Auto detect" uudecode-decode-region)
+ (function-item :tag "Internal" uudecode-decode-region-internal)
+ (function-item :tag "External" uudecode-decode-region-external))
+ :group 'gnus-article-mime)
+
+(defcustom mm-uu-binhex-decode-function 'binhex-decode-region
+ "*Function to binhex decode.
+Internal function is done in elisp by default, therefore decoding may
+appear to be horribly slow . You can make Gnus use the external Unix
+decoder, such as hexbin."
+ :type '(choice (function-item :tag "Auto detect" binhex-decode-region)
+ (function-item :tag "Internal" binhex-decode-region-internal)
+ (function-item :tag "External" binhex-decode-region-external))
+ :group 'gnus-article-mime)
+
+(defvar mm-uu-yenc-decode-function 'yenc-decode-region)
+
+(defvar mm-uu-pgp-beginning-signature
+ "^-----BEGIN PGP SIGNATURE-----")
+
+(defvar mm-uu-beginning-regexp nil)
+
+(defvar mm-dissect-disposition "inline"
+ "The default disposition of uu parts.
+This can be either \"inline\" or \"attachment\".")
+
+(defvar mm-uu-emacs-sources-regexp "gnu\\.emacs\\.sources"
+ "The regexp of Emacs sources groups.")
+
+(defcustom mm-uu-diff-groups-regexp "gnus\\.commits"
+ "*Regexp matching diff groups."
+ :version "21.4"
+ :type 'regexp
+ :group 'gnus-article-mime)
+
+(defvar mm-uu-type-alist
+ '((postscript
+ "^%!PS-"
+ "^%%EOF$"
+ mm-uu-postscript-extract
+ nil)
+ (uu
+ "^begin[ \t]+0?[0-7][0-7][0-7][ \t]+"
+ "^end[ \t]*$"
+ mm-uu-uu-extract
+ mm-uu-uu-filename)
+ (binhex
+ "^:...............................................................$"
+ ":$"
+ mm-uu-binhex-extract
+ nil
+ mm-uu-binhex-filename)
+ (yenc
+ "^=ybegin.*size=[0-9]+.*name=.*$"
+ "^=yend.*size=[0-9]+"
+ mm-uu-yenc-extract
+ mm-uu-yenc-filename)
+ (shar
+ "^#! */bin/sh"
+ "^exit 0$"
+ mm-uu-shar-extract)
+ (forward
+;;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
+;;; Peter von der Ah\'e <pahe@daimi.au.dk>
+ "^-+ \\(Start of \\)?Forwarded message"
+ "^-+ End \\(of \\)?forwarded message"
+ mm-uu-forward-extract
+ nil
+ mm-uu-forward-test)
+ (gnatsweb
+ "^----gnatsweb-attachment----"
+ nil
+ mm-uu-gnatsweb-extract)
+ (pgp-signed
+ "^-----BEGIN PGP SIGNED MESSAGE-----"
+ "^-----END PGP SIGNATURE-----"
+ mm-uu-pgp-signed-extract
+ nil
+ nil)
+ (pgp-encrypted
+ "^-----BEGIN PGP MESSAGE-----"
+ "^-----END PGP MESSAGE-----"
+ mm-uu-pgp-encrypted-extract
+ nil
+ nil)
+ (pgp-key
+ "^-----BEGIN PGP PUBLIC KEY BLOCK-----"
+ "^-----END PGP PUBLIC KEY BLOCK-----"
+ mm-uu-pgp-key-extract
+ mm-uu-gpg-key-skip-to-last
+ nil)
+ (emacs-sources
+ "^;;;?[ \t]*[^ \t]+\\.el[ \t]*--"
+ "^;;;?[ \t]*\\([^ \t]+\\.el\\)[ \t]+ends here"
+ mm-uu-emacs-sources-extract
+ nil
+ mm-uu-emacs-sources-test)
+ (diff
+ "^Index: "
+ nil
+ mm-uu-diff-extract
+ nil
+ mm-uu-diff-test)))
+
+(defcustom mm-uu-configure-list '((shar . disabled))
+ "A list of mm-uu configuration.
+To disable dissecting shar codes, for instance, add
+`(shar . disabled)' to this list."
+ :type 'alist
+ :options (mapcar (lambda (entry)
+ (list (car entry) '(const disabled)))
+ mm-uu-type-alist)
+ :group 'gnus-article-mime)
+
+(defvar mm-uu-text-plain-type '("text/plain" (charset . gnus-decoded))
+ "MIME type and parameters for text/plain parts.
+`gnus-decoded' is a fake charset, which means no further decoding.")
+
+;; functions
+
+(defsubst mm-uu-type (entry)
+ (car entry))