(gnus-server-toggle-cloud-server): Only allow clouding applicable types.
[gnus] / lisp / mm-url.el
index 89072f7..bb342d6 100644 (file)
@@ -1,28 +1,27 @@
 ;;; mm-url.el --- a wrapper of url functions/commands for Gnus
 ;;; mm-url.el --- a wrapper of url functions/commands for Gnus
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+
+;; Copyright (C) 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 
 ;; This file is part of GNU Emacs.
 
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 
 ;; This file is part of GNU Emacs.
 
-;; 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.
+;; 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 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 GNU
-;; General Public License for more details.
+;; 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
+;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
 
 ;; 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., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
 
 ;;; Commentary:
 
-;; Some codes are stolen from w3 and url packages. Some are moved from
+;; Some code is stolen from w3 and url packages. Some are moved from
 ;; nnweb.
 
 ;; TODO: Support POST, cookie.
 ;; nnweb.
 
 ;; TODO: Support POST, cookie.
 (eval-when-compile (require 'cl))
 
 (require 'mm-util)
 (eval-when-compile (require 'cl))
 
 (require 'mm-util)
+(require 'gnus)
 
 
-(eval-and-compile
-  (autoload 'executable-find "executable")
-  (autoload 'url-insert-file-contents "url-handlers"))
+(defvar url-current-object)
+(defvar url-package-name)
+(defvar url-package-version)
 
 (defgroup mm-url nil
   "A wrapper of url package and external url command for Gnus."
 
 (defgroup mm-url nil
   "A wrapper of url package and external url command for Gnus."
 
 (defcustom mm-url-use-external (not
                                (condition-case nil
 
 (defcustom mm-url-use-external (not
                                (condition-case nil
-                                   (require 'url-handlers)
+                                   (require 'url)
                                  (error nil)))
                                  (error nil)))
-  "*If not-nil, use external grab program `mm-url-program'."
+  "*If non-nil, use external grab program `mm-url-program'."
+  :version "22.1"
   :type 'boolean
   :group 'mm-url)
 
 (defvar mm-url-predefined-programs
   :type 'boolean
   :group 'mm-url)
 
 (defvar mm-url-predefined-programs
-  '((wget "wget" "-q" "-O" "-")
+  '((wget "wget" "--user-agent=mm-url" "-q" "-O" "-")
+    (w3m  "w3m" "-dump_source")