* gnus-picon.el (gnus-picon-find-face): Search MISC for all types.
[gnus] / lisp / mm-uu.el
1 ;;; mm-uu.el --- Return uu stuff as mm handles
2 ;; Copyright (c) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
3
4 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
5 ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
6
7 ;; This file is part of GNU Emacs.
8
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)
12 ;; any later version.
13 ;;
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.
18
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.
23
24 ;;; Commentary:
25
26 ;;; Code:
27
28 (eval-when-compile (require 'cl))
29 (require 'mail-parse)
30 (require 'nnheader)
31 (require 'mm-decode)
32 (require 'mailcap)
33 (require 'mml2015)
34
35 (autoload 'uudecode-decode-region "uudecode")
36 (autoload 'uudecode-decode-region-external "uudecode")
37 (autoload 'uudecode-decode-region-internal "uudecode")
38
39 (autoload 'binhex-decode-region "binhex")
40 (autoload 'binhex-decode-region-external "binhex")
41 (autoload 'binhex-decode-region-internal "binhex")
42
43 (defcustom mm-uu-decode-function 'uudecode-decode-region
44   "*Function to uudecode.
45 Internal function is done in Lisp by default, therefore decoding may
46 appear to be horribly slow.  You can make Gnus use an external
47 decoder, such as uudecode."
48   :type '(choice
49           (function-item :tag "Auto detect" uudecode-decode-region)
50           (function-item :tag "Internal" uudecode-decode-region-internal)
51           (function-item :tag "External" uudecode-decode-region-external))
52   :group 'gnus-article-mime)
53
54 (defcustom mm-uu-binhex-decode-function 'binhex-decode-region
55   "*Function to binhex decode.
56 Internal function is done in elisp by default, therefore decoding may
57 appear to be horribly slow . You can make Gnus use the external Unix
58 decoder, such as hexbin."
59   :type '(choice (function-item :tag "Auto detect" binhex-decode-region)
60                  (function-item :tag "Internal" binhex-decode-region-internal)
61                  (function-item :tag "External" binhex-decode-region-external))
62   :group 'gnus-article-mime)
63
64 (defvar mm-uu-pgp-beginning-signature
65      "^-----BEGIN PGP SIGNATURE-----")
66
67 (defvar mm-uu-beginning-regexp nil)
68
69 (defvar mm-dissect-disposition "inline"
70   "The default disposition of uu parts.
71 This can be either \"inline\" or \"attachment\".")
72
73 (defvar mm-uu-emacs-sources-regexp "gnu\\.emacs\\.sources"
74   "The regexp of emacs sources groups.")
75
76 (defvar mm-uu-type-alist
77   '((postscript
78      "^%!PS-"
79      "^%%EOF$"
80      mm-uu-postscript-extract
81      nil)
82     (uu
83      "^begin[ \t]+[0-7][0-7][0-7][ \t]+"
84      "^end[ \t]*$"
85      mm-uu-uu-extract
86      mm-uu-uu-filename)
87     (binhex
88      "^:...............................................................$"
89      ":$"
90      mm-uu-binhex-extract
91      nil
92      mm-uu-binhex-filename)