;;; mm-decode.el --- Functions for decoding MIME things
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; 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)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(require 'mail-parse)
-(require 'mailcap)
(require 'mm-bodies)
(eval-when-compile (require 'cl)
(require 'term))
-(eval-and-compile
- (autoload 'mm-inline-partial "mm-partial")
- (autoload 'mm-inline-external-body "mm-extern")
- (autoload 'mm-extern-cache-contents "mm-extern")
- (autoload 'mm-insert-inline "mm-view"))
+(autoload 'gnus-map-function "gnus-util")
+(autoload 'gnus-replace-in-string "gnus-util")
+(autoload 'gnus-read-shell-command "gnus-util")
+
+(autoload 'mm-inline-partial "mm-partial")
+(autoload 'mm-inline-external-body "mm-extern")
+(autoload 'mm-extern-cache-contents "mm-extern")
+(autoload 'mm-insert-inline "mm-view")
(defvar gnus-current-window-configuration)
,disposition ,description ,cache ,id))
(defcustom mm-text-html-renderer
- (cond ((locate-library "w3") 'w3)
- ((executable-find "w3m") (if (locate-library "w3m")
- 'w3m
- 'w3m-standalone))
+ (cond ((executable-find "w3m")
+ (if (locate-library "w3m")
+ 'w3m
+ 'w3m-standalone))
((executable-find "links") 'links)
((executable-find "lynx") 'lynx)
- (t 'html2text))
+ ((locate-library "w3") 'w3)
+ ((locate-library "html2text") 'html2text)
+ (t nil))
"Render of HTML contents.
It is one of defined renderer types, or a rendering function.
The defined renderer types are:
-`w3' : use Emacs/W3;
`w3m' : use emacs-w3m;
`w3m-standalone': use w3m;
`links': use links;
`lynx' : use lynx;
+`w3' : use Emacs/W3;
`html2text' : use html2text;
-nil : use external viewer."
- :version "22.1"
+nil : use external viewer (default web browser)."
+ :version "23.0" ;; No Gnus
:type '(choice (const w3)
- (const w3m)
- (const w3m-standalone)
+ (const w3m :tag "emacs-w3m")
+ (const w3m-standalone :tag "standalone w3m" )
(const links)
(const lynx)
(const html2text)
- (const nil)
+ (const nil :tag "External viewer")
(function))
:group 'mime-display)
;; makes it possible to install another package which provides an
;; alternative implementation of diff-mode. --Stef
(fboundp 'diff-mode)))
+ ;; In case mime.types uses x-diff (as does Debian's mime-support-3.40).
+