1 ;;; mm-url.el --- a wrapper of url functions/commands for Gnus
2 ;; Copyright (C) 2001 Free Software Foundation, Inc.
4 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
6 ;; This file is part of GNU Emacs.
8 ;; GNU Emacs is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published
10 ;; by the Free Software Foundation; either version 2, or (at your
11 ;; option) any later version.
13 ;; GNU Emacs is distributed in the hope that it will be useful, but
14 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ;; General Public License for more details.
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GNU Emacs; see the file COPYING. If not, write to the
20 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 ;; Boston, MA 02111-1307, USA.
25 ;; Some codes are stolen from w3 and url packages. Some are moved from
28 ;; TODO: Support POST, cookie.
32 (eval-when-compile (require 'cl))
37 (autoload 'executable-find "executable")
38 (autoload 'url-insert-file-contents "url-handlers"))
41 "A wrapper of url package and external url command for Gnus."
44 (defcustom mm-url-use-external (not
46 (require 'url-handlers)
48 "*If not-nil, use external grab program `mm-url-program'."
52 (defvar mm-url-predefined-programs
53 '((wget "wget" "-q" "-O" "-")
54 (lynx "lynx" "-source")
57 (defcustom mm-url-program
59 ((executable-find "wget") 'wget)