X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmm-uu.el;h=92964d0840f06656c3e9665e1708ee09fbcfe541;hb=36bd162f4f7cd40453b8683e796730836c352b2a;hp=bf1bb7004cb5e04915b0888651fe63a957c660b8;hpb=1dedb06bd20a9b6868e120d80e75044d2afdcad5;p=elisp%2Fgnus.git- diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index bf1bb70..92964d0 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -31,20 +31,23 @@ (require 'mm-decode) (require 'gnus-mailcap) (require 'mml2015) -(require 'uudecode) -(require 'binhex) -;; This is not the right place for this. uudecode.el should decide -;; whether or not to use a program with a single interface, but I -;; guess it's too late now. Also the default should depend on a test -;; for the program. -- fx +(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") + (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 "Internal" uudecode-decode-region) + (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) @@ -53,12 +56,13 @@ decoder, such as uudecode." 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 (item :tag "internal" binhex-decode-region) - (item :tag "external" binhex-decode-region-external)) + :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-pgp-beginning-signature - "^-----BEGIN PGP SIGNATURE-----") + "^-----BEGIN PGP SIGNATURE-----") (defvar mm-uu-beginning-regexp nil) @@ -173,12 +177,12 @@ Return that buffer." (if symbol (set-default symbol value)) (setq mm-uu-beginning-regexp nil) (mapcar (lambda (entry) - (if (mm-uu-configure-p (mm-uu-type entry) 'disabled) - nil - (setq mm-uu-beginning-regexp - (concat mm-uu-beginning-regexp - (if mm-uu-beginning-regexp "\\|") - (mm-uu-beginning-regexp entry))))) + (if (mm-uu-configure-p (mm-uu-type entry) 'disabled) + nil + (setq mm-uu-beginning-regexp + (concat mm-uu-beginning-regexp + (if mm-uu-beginning-regexp "\\|") + (mm-uu-beginning-regexp entry))))) mm-uu-type-alist)) (mm-uu-configure) @@ -371,7 +375,7 @@ Return that buffer." (mm-make-handle buf '("application/pgp-keys")))) -;;;### autoload +;;;###autoload (defun mm-uu-dissect () "Dissect the current buffer and return a list of uu handles." (let ((case-fold-search t) @@ -402,7 +406,7 @@ Return that buffer." (funcall func)) (forward-line);; in case of failure (when (and (not (mm-uu-configure-p (mm-uu-type entry) 'disabled)) - (let ((end-regexp (mm-uu-end-regexp entry))) + (let ((end-regexp (mm-uu-end-regexp entry))) (if (not end-regexp) (or (setq end-point (point-max)) t) (prog1