1 ;;; mm-uu.el --- Return uu stuff as mm handles
2 ;; Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
5 ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
28 (eval-when-compile (require 'cl))
35 (autoload 'uudecode-decode-region "uudecode")
36 (autoload 'uudecode-decode-region-external "uudecode")
37 (autoload 'uudecode-decode-region-internal "uudecode")
39 (autoload 'binhex-decode-region "binhex")
40 (autoload 'binhex-decode-region-external "binhex")
41 (autoload 'binhex-decode-region-internal "binhex")
43 (autoload 'yenc-decode-region "yenc")
44 (autoload 'yenc-extract-filename "yenc")
46 (defcustom mm-uu-decode-function 'uudecode-decode-region
47 "*Function to uudecode.
48 Internal function is done in Lisp by default, therefore decoding may
49 appear to be horribly slow. You can make Gnus use an external
50 decoder, such as uudecode."
52 (function-item :tag "Auto detect" uudecode-decode-region)
53 (function-item :tag "Internal" uudecode-decode-region-internal)
54 (function-item :tag "External" uudecode-decode-region-external))
55 :group 'gnus-article-mime)
57 (defcustom mm-uu-binhex-decode-function 'binhex-decode-region
58 "*Function to binhex decode.
59 Internal function is done in elisp by default, therefore decoding may
60 appear to be horribly slow . You can make Gnus use the external Unix
61 decoder, such as hexbin."
62 :type '(choice (function-item :tag "Auto detect" binhex-decode-region)
63 (function-item :tag "Internal" binhex-decode-region-internal)
64 (function-item :tag "External" binhex-decode-region-external))
65 :group 'gnus-article-mime)
67 (defvar mm-uu-yenc-decode-function 'yenc-decode-region)
69 (defvar mm-uu-pgp-beginning-signature
70 "^-----BEGIN PGP SIGNATURE-----")
72 (defvar mm-uu-beginning-regexp nil)
74 (defvar mm-dissect-disposition "inline"
75 "The default disposition of uu parts.
76 This can be either \"inline\" or \"attachment\".")
78 (defvar mm-uu-emacs-sources-regexp "gnu\\.emacs\\.sources"
79 "The regexp of Emacs sources groups.")
81 (defcustom mm-uu-diff-groups-regexp "gnus\\.commits"
82 "*Regexp matching diff groups."
84 :group 'gnus-article-mime)
86 (defvar mm-uu-type-alist
90 mm-uu-postscript-extract
93 "^begin[ \t]+0?[0-7][0-7][0-7][ \t]+"
98 "^:...............................................................$"
102 mm-uu-binhex-filename)
104 "^=ybegin.*size=[0-9]+.*name=.*$"
105 "^=yend.*size=[0-9]+"
113 ;;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
114 ;;; Peter von der Ah\'e <pahe@daimi.au.dk>
115 "^-+ \\(Start of \\)?Forwarded message"
116 "^-+ End \\(of \\)?forwarded message"
117 mm-uu-forward-extract
121 "^----gnatsweb-attachment----"
123 mm-uu-gnatsweb-extract)
125 "^-----BEGIN PGP SIGNED MESSAGE-----"
126 "^-----END PGP SIGNATURE-----"
127 mm-uu-pgp-signed-extract
131 "^-----BEGIN PGP MESSAGE-----"
132 "^-----END PGP MESSAGE-----"
133 mm-uu-pgp-encrypted-extract
137 "^-----BEGIN PGP PUBLIC KEY BLOCK-----"
138 "^-----END PGP PUBLIC KEY BLOCK-----"
139 mm-uu-pgp-key-extract
140 mm-uu-gpg-key-skip-to-last
143 "^;;;?[ \t]*[^ \t]+\\.el[ \t]*--"
144 "^;;;?[ \t]*\\([^ \t]+\\.el\\)[ \t]+ends here"
145 mm-uu-emacs-sources-extract
147 mm-uu-emacs-sources-test)
155 (defcustom mm-uu-configure-list '((shar . disabled))
156 "A list of mm-uu configuration.
157 To disable dissecting shar codes, for instance, add
158 `(shar . disabled)' to this list."