Merge from emacs--devo--0
[gnus] / lisp / mm-bodies.el
index 01a7576..e7743d1 100644 (file)
@@ -1,7 +1,7 @@
 ;;; mm-bodies.el --- Functions for decoding MIME things
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;     MORIOKA Tomohiko <morioka@jaist.ac.jp>
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 
 ;;; Code:
 
-(eval-when-compile
-  (defvar mm-uu-decode-function)
-  (defvar mm-uu-binhex-decode-function))
+;; For Emacs < 22.2.
+(eval-and-compile
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 
 (require 'mm-util)
 (require 'rfc2047)
 (require 'mm-encode)
 
+(defvar mm-uu-yenc-decode-function)
+(defvar mm-uu-decode-function)
+(defvar mm-uu-binhex-decode-function)
+
 ;; 8bit treatment gets any char except: 0x32 - 0x7f, LF, TAB, BEL,
 ;; BS, vertical TAB, form feed, and ^_
 ;;
@@ -67,6 +71,9 @@ Valid encodings are `7bit', `8bit', `quoted-printable' and `base64'."
                               (const base64))))
   :group 'mime)
 
+(autoload 'message-options-get "message")
+(declare-function message-options-set "message" (symbol value))
+
 (defun mm-encode-body (&optional charset)
   "Encode a body.
 Should be called narrowed to the body that is to be encoded.
@@ -171,8 +178,6 @@ If no encoding was done, nil is returned."
 ;;; Functions for decoding
 ;;;
 
-(eval-when-compile (defvar mm-uu-yenc-decode-function))
-
 (defun mm-decode-content-transfer-encoding (encoding &optional type)
   "Decodes buffer encoded with ENCODING, returning success status.
 If TYPE is `text/plain' CRLF->LF translation may occur."