Remove all mentions of w3
authorLars Ingebrigtsen <larsi@building.gnus.org>
Fri, 31 Jan 2014 23:33:43 +0000 (15:33 -0800)
committerLars Ingebrigtsen <larsi@building.gnus.org>
Fri, 31 Jan 2014 23:33:43 +0000 (15:33 -0800)
w3 hasn't been updated in a decade, and is probably not used a lot any
more.  And both w3m and shr offer more updated HTML rendering support.

Also remove url.el checks from the build process, since all Emacs
targets that Ma Gnus builds against have url.el build-in.

16 files changed:
ChangeLog
aclocal.m4
configure
configure.in
lisp/ChangeLog
lisp/Makefile.in
lisp/dgnushack.el
lisp/gnus-art.el
lisp/lpath.el
lisp/mailcap.el
lisp/mm-decode.el
lisp/mm-url.el
lisp/mm-view.el
lisp/nnrss.el
lisp/nnweb.el
make.bat

index 824f1e9..9b30f70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-31  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * make.bat (REM FIXME): Remove mention of outdated w3.
+
+       * aclocal.m4 (AC_EMACS_CHECK_LIB): Remove checks for w3 and url.  w3 is
+       outdated, and all Emacs versions Ma Gnus builds against has url.el.
+
 2013-06-20  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * configure.in: Work for term-mode running in Emacs.
index 4773670..9a5da0d 100644 (file)
@@ -185,54 +185,6 @@ if test -z "$3"; then
 fi
 ])
 
-dnl
-dnl Perform sanity checking and try to locate the W3 package
-dnl
-AC_DEFUN(AC_CHECK_W3, [
-AC_MSG_CHECKING(for acceptable W3 version)
-AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_W3,[
-AC_EMACS_CHECK_LIB(w3_forms, w3-form-encode-xwfu,"noecho")
-if test "${HAVE_w3_forms}" = "yes"; then
-       EMACS_cv_ACCEPTABLE_W3=yes
-else
-       EMACS_cv_ACCEPTABLE_W3=no
-fi
-
-if test "${EMACS_cv_ACCEPTABLE_W3}" = "yes"; then
-       AC_EMACS_LISP(w3_dir,(file-name-directory (locate-library \"w3-forms\")),"noecho")
-       EMACS_cv_ACCEPTABLE_W3=$EMACS_cv_SYS_w3_dir
-fi
-])
-   AC_ARG_WITH(w3,[  --with-w3=DIR           Specify where to find the w3 package], [ EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
-   W3=${EMACS_cv_ACCEPTABLE_W3}
-   AC_SUBST(W3)
-   AC_MSG_RESULT("${W3}")
-])
-
-dnl
-dnl Perform sanity checking and try to locate the W3 package
-dnl
-AC_DEFUN(AC_CHECK_URL, [
-AC_MSG_CHECKING(for acceptable URL version)
-AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_URL,[
-AC_EMACS_CHECK_LIB(url, url-retrieve, "noecho")
-if test "${HAVE_url}" = "yes"; then
-       EMACS_cv_ACCEPTABLE_URL=yes
-else
-       EMACS_cv_ACCEPTABLE_URL=no
-fi
-
-if test "${EMACS_cv_ACCEPTABLE_URL}" = "yes"; then
-       AC_EMACS_LISP(url_dir,(file-name-directory (locate-library \"url\")),"noecho")
-       EMACS_cv_ACCEPTABLE_URL=$EMACS_cv_SYS_url_dir
-fi
-])
-   AC_ARG_WITH(url,[  --with-url=DIR          Specify where to find the url package], [ EMACS_cv_ACCEPTABLE_URL=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
-   URL=${EMACS_cv_ACCEPTABLE_URL}
-   AC_SUBST(URL)
-   AC_MSG_RESULT("${URL}")
-])
-
 dnl
 dnl Perform checking available fonts: Adobe Bembo, Adobe Futura and 
 dnl Bitstream Courier.
index baa4061..5f6062b 100755 (executable)
--- a/configure
+++ b/configure
@@ -593,10 +593,6 @@ WITHOUT_FONTS_bembo
 WITH_FONTS_bembo
 LATEX
 FLAGS
-W3
-HAVE_w3_forms
-URL
-HAVE_url
 info_dir
 etcdir
 lispdir
@@ -653,8 +649,6 @@ with_xemacs
 with_emacs
 with_lispdir
 with_etcdir
-with_url
-with_w3
 with_fonts
 '
       ac_precious_vars='build_alias
@@ -1270,8 +1264,6 @@ Optional Packages:
   --with-emacs[=PROG]     use Emacs to build (default: PROG=emacs)
   --with-lispdir=DIR      Where to install lisp files
   --with-etcdir=DIR       Where to install etc files
-  --with-url=DIR          Specify where to find the url package
-  --with-w3=DIR           Specify where to find the w3 package
   --with-fonts            Assume all fonts required are available
 
 Report bugs to the package provider.
@@ -2095,208 +2087,6 @@ $as_echo "$info_dir" >&6; }
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acceptable URL version" >&5
-$as_echo_n "checking for acceptable URL version... " >&6; }
-if ${EMACS_cv_ACCEPTABLE_URL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for url-retrieve in url" >&5
-$as_echo_n "checking for url-retrieve in url... " >&6; }
-fi
-library=`echo url | tr _ -`
-
-elisp="(progn (fmakunbound 'url-retrieve) (condition-case nil (progn (require '$library) (fboundp 'url-retrieve)) (error (prog1 nil (message \"$library not found\")))))"
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for url" >&5
-$as_echo_n "checking for url... " >&6; }
-fi
-if ${EMACS_cv_SYS_url+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-       OUTPUT=./conftest-$$
-       echo ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil \"${OUTPUT}\"))" >& 5 2>&1
-       ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x 'ignore) (prin1-to-string x)) nil \"${OUTPUT}\"nil 5))" >& 5 2>&1
-       retval=`cat ${OUTPUT}`
-       echo "=> ${retval}" >& 5 2>&1
-       rm -f ${OUTPUT}
-       EMACS_cv_SYS_url=$retval
-
-fi
-
-url=${EMACS_cv_SYS_url}
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $url" >&5
-$as_echo "$url" >&6; }
-fi
-
-if test "${EMACS_cv_SYS_url}" = "nil"; then
-       EMACS_cv_SYS_url=no
-fi
-if test "${EMACS_cv_SYS_url}" = "t"; then
-       EMACS_cv_SYS_url=yes
-fi
-HAVE_url=${EMACS_cv_SYS_url}
-
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_url" >&5
-$as_echo "$HAVE_url" >&6; }
-fi
-
-if test "${HAVE_url}" = "yes"; then
-       EMACS_cv_ACCEPTABLE_URL=yes
-else
-       EMACS_cv_ACCEPTABLE_URL=no
-fi
-
-if test "${EMACS_cv_ACCEPTABLE_URL}" = "yes"; then
-
-elisp="(file-name-directory (locate-library \"url\"))"
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for url_dir" >&5
-$as_echo_n "checking for url_dir... " >&6; }
-fi
-if ${EMACS_cv_SYS_url_dir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-       OUTPUT=./conftest-$$
-       echo ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil \"${OUTPUT}\"))" >& 5 2>&1
-       ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x 'ignore) (prin1-to-string x)) nil \"${OUTPUT}\"nil 5))" >& 5 2>&1
-       retval=`cat ${OUTPUT}`
-       echo "=> ${retval}" >& 5 2>&1
-       rm -f ${OUTPUT}
-       EMACS_cv_SYS_url_dir=$retval
-
-fi
-
-url_dir=${EMACS_cv_SYS_url_dir}
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $url_dir" >&5
-$as_echo "$url_dir" >&6; }
-fi
-
-       EMACS_cv_ACCEPTABLE_URL=$EMACS_cv_SYS_url_dir
-fi
-
-fi
-
-
-# Check whether --with-url was given.
-if test "${with_url+set}" = set; then :
-  withval=$with_url;  EMACS_cv_ACCEPTABLE_URL=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null`
-fi
-
-   URL=${EMACS_cv_ACCEPTABLE_URL}
-
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${URL}\"" >&5
-$as_echo "\"${URL}\"" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acceptable W3 version" >&5
-$as_echo_n "checking for acceptable W3 version... " >&6; }
-if ${EMACS_cv_ACCEPTABLE_W3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for w3-form-encode-xwfu in w3_forms" >&5
-$as_echo_n "checking for w3-form-encode-xwfu in w3_forms... " >&6; }
-fi
-library=`echo w3_forms | tr _ -`
-
-elisp="(progn (fmakunbound 'w3-form-encode-xwfu) (condition-case nil (progn (require '$library) (fboundp 'w3-form-encode-xwfu)) (error (prog1 nil (message \"$library not found\")))))"
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for w3_forms" >&5
-$as_echo_n "checking for w3_forms... " >&6; }
-fi
-if ${EMACS_cv_SYS_w3_forms+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-       OUTPUT=./conftest-$$
-       echo ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil \"${OUTPUT}\"))" >& 5 2>&1
-       ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x 'ignore) (prin1-to-string x)) nil \"${OUTPUT}\"nil 5))" >& 5 2>&1
-       retval=`cat ${OUTPUT}`
-       echo "=> ${retval}" >& 5 2>&1
-       rm -f ${OUTPUT}
-       EMACS_cv_SYS_w3_forms=$retval
-
-fi
-
-w3_forms=${EMACS_cv_SYS_w3_forms}
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $w3_forms" >&5
-$as_echo "$w3_forms" >&6; }
-fi
-
-if test "${EMACS_cv_SYS_w3_forms}" = "nil"; then
-       EMACS_cv_SYS_w3_forms=no
-fi
-if test "${EMACS_cv_SYS_w3_forms}" = "t"; then
-       EMACS_cv_SYS_w3_forms=yes
-fi
-HAVE_w3_forms=${EMACS_cv_SYS_w3_forms}
-
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_w3_forms" >&5
-$as_echo "$HAVE_w3_forms" >&6; }
-fi
-
-if test "${HAVE_w3_forms}" = "yes"; then
-       EMACS_cv_ACCEPTABLE_W3=yes
-else
-       EMACS_cv_ACCEPTABLE_W3=no
-fi
-
-if test "${EMACS_cv_ACCEPTABLE_W3}" = "yes"; then
-
-elisp="(file-name-directory (locate-library \"w3-forms\"))"
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for w3_dir" >&5
-$as_echo_n "checking for w3_dir... " >&6; }
-fi
-if ${EMACS_cv_SYS_w3_dir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-       OUTPUT=./conftest-$$
-       echo ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil \"${OUTPUT}\"))" >& 5 2>&1
-       ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x 'ignore) (prin1-to-string x)) nil \"${OUTPUT}\"nil 5))" >& 5 2>&1
-       retval=`cat ${OUTPUT}`
-       echo "=> ${retval}" >& 5 2>&1
-       rm -f ${OUTPUT}
-       EMACS_cv_SYS_w3_dir=$retval
-
-fi
-
-w3_dir=${EMACS_cv_SYS_w3_dir}
-if test -z ""noecho""; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $w3_dir" >&5
-$as_echo "$w3_dir" >&6; }
-fi
-
-       EMACS_cv_ACCEPTABLE_W3=$EMACS_cv_SYS_w3_dir
-fi
-
-fi
-
-
-# Check whether --with-w3 was given.
-if test "${with_w3+set}" = set; then :
-  withval=$with_w3;  EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null`
-fi
-
-   W3=${EMACS_cv_ACCEPTABLE_W3}
-
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${W3}\"" >&5
-$as_echo "\"${W3}\"" >&6; }
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which options to pass on to (X)Emacs" >&5
 $as_echo_n "checking which options to pass on to (X)Emacs... " >&6; }
   if test "x$FLAGS" = "x"; then
index daca503..0988122 100644 (file)
@@ -26,8 +26,6 @@ AC_CHECK_PROG(EMACS, emacs, emacs, xemacs)
 AC_PATH_LISPDIR
 AC_PATH_ETCDIR
 AC_PATH_INFO_DIR
-AC_CHECK_URL
-AC_CHECK_W3
 AC_SET_BUILD_FLAGS
 GNUS_CHECK_FONTS
 
index b918866..bbc1508 100644 (file)
@@ -1,5 +1,16 @@
 2014-01-31  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * mm-url.el: Remove all usage of w3.
+
+       * nnrss.el: Ditto.
+
+       * mm-decode.el: Ditto.
+
+       * mm-view.el: Ditto.
+
+       * dgnushack.el: Remove mentions of urldir and w3-dir, since w3 is
+       outdated and all Emacsen have url.el built-in.
+
        * gnus-setup.el: Remove outdated file.
 
 2014-01-31  Lars Magne Ingebrigtsen  <lars@ingebrigtsen.no>
index a645315..d60d5b8 100644 (file)
@@ -12,9 +12,7 @@ INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 SHELL = /bin/sh
 VPATH = @srcdir@
-W3DIR = @W3@
-URLDIR = @URL@
-EMACS_COMP = URLDIR="$(URLDIR)" W3DIR="$(W3DIR)" lispdir="$(lispdir)" srcdir=$(srcdir) $(EMACS) $(FLAGS)
+EMACS_COMP = lispdir="$(lispdir)" srcdir=$(srcdir) $(EMACS) $(FLAGS)
 
 all total: clean-some gnus-load.el
        $(EMACS_COMP) -f dgnushack-compile
index 5c29eef..2ad0183 100644 (file)
 (if (my-getenv "lispdir")
     (push (my-getenv "lispdir") load-path))
 
-(push (or (my-getenv "URLDIR") (expand-file-name "../../url/lisp/" loaddir))
-      load-path)
-
-(push (or (my-getenv "W3DIR") (expand-file-name "../../w3/lisp/" loaddir))
-      load-path)
-
 ;(push "/usr/share/emacs/site-lisp" load-path)
 
-;; If we are building w3 in a different directory than the source
+;; If we are building Gnus in a different directory than the source
 ;; directory, we must read *.el from source directory and write *.elc
 ;; into the building directory.  For that, we define this function
 ;; before loading bytecomp.  Bytecomp doesn't overwrite this function.
     (autoload 'toggle-truncate-lines "view-less" nil t)
     (autoload 'trace-function-background "trace" nil t)
     (autoload 'unmorse-region "morse" nil t)
-    (autoload 'w3-do-setup "w3")
-    (autoload 'w3-prepare-buffer "w3-display")
-    (autoload 'w3-region "w3-display" nil t)
     (defalias 'frame-char-height 'frame-height)
     (defalias 'frame-char-width 'frame-width)
     (defalias 'frame-parameter 'frame-property)
     (defalias 'replace-highlight 'ignore)
     (defalias 'gnutls-available-p 'ignore)
     (defvar timer-list nil)
-    (defvar scroll-margin 0)
-    (defalias 'w3-coding-system-for-mime-charset 'ignore)))
+    (defvar scroll-margin 0)))
 
 (defun dgnushack-emacs-compile-defcustom-p ()
   "Return non-nil if Emacs byte compiles `defcustom' forms.
@@ -307,12 +297,6 @@ This means that every warning will be reported as an error."
       (setq files (delete file files)))
     (when (featurep 'base64)
       (setq files (delete "base64.el" files)))
-    (condition-case code
-       (require 'w3-parse)
-      (error
-       (message "No w3: %s %s" (cadr code) (or (locate-library "w3-parse") ""))
-       (dolist (file '("webmail.el" "nnwfm.el"))
-        (setq files (delete file files)))))
     (condition-case code
        ;; Under XEmacs 21.4 this loads easy-mmode.elc that provides
        ;; the Emacs functions `propertize' and `replace-regexp-in-string'.
index 6f32655..f8bdca6 100644 (file)
@@ -5885,14 +5885,6 @@ If displaying \"text/html\" is discouraged \(see
    ((and (equal (car handle) "multipart/related")
         (not (or gnus-mime-display-multipart-as-mixed
                  gnus-mime-display-multipart-related-as-mixed)))
-    ;;;!!!We should find the start part, but we just default
-    ;;;!!!to the first part.
-    ;;(gnus-mime-display-part (cadr handle))
-    ;;;!!! Most multipart/related is an HTML message plus images.
-    ;;;!!! Unfortunately we are unable to let W3 display those
-    ;;;!!! included images, so we just display it as a mixed multipart.
-    ;;(gnus-mime-display-mixed (cdr handle))
-    ;;;!!! No, w3 can display everything just fine.
     (gnus-mime-display-part (cadr handle)))
    ((equal (car handle) "multipart/signed")
     (gnus-add-wash-type 'signed)
index d72d921..59cd757 100644 (file)
@@ -11,9 +11,7 @@
 
 (unless (featurep 'xemacs)
   (maybe-fbind '(pgg-display-output-buffer url-generic-parse-url))
-  (maybe-bind '(help-xref-stack-item
-               url-version w3-meta-charset-content-type-regexp
-               w3-meta-content-type-charset-regexp))
+  (maybe-bind '(help-xref-stack-item url-version))
 
   (when (<= emacs-major-version 23)
     (maybe-bind '(mail-encode-mml)))
@@ -37,8 +35,7 @@
        bookmark-prop-get completion-at-point display-time-event-handler
        epg-check-configuration find-coding-system frame-device gnutls-negotiate
        libxml-parse-html-region recenter-top-bottom rmail-swap-buffers-maybe
-       shr-insert-document w3-do-setup w3-parse-buffer w3-prepare-buffer
-       w3-region w3m-detect-meta-charset w3m-region))
+       shr-insert-document w3m-detect-meta-charset w3m-region))
     (maybe-bind
      '(epa-file-encrypt-to w3m-link-map))))
 
@@ -80,7 +77,7 @@
      select-safe-coding-system set-network-process-option shr-insert-document
      sort-coding-systems spam-initialize term-char-mode term-mode track-mouse
      ucs-to-char url-generic-parse-url url-insert-file-contents
-     vcard-pretty-print w3-parse-buffer w3m-detect-meta-charset w3m-region
+     vcard-pretty-print w3m-detect-meta-charset w3m-region
      window-edges))
   (maybe-bind
    '(adaptive-fill-first-line-regexp
@@ -95,8 +92,7 @@
      rmail-default-rmail-file rmail-insert-mime-forwarded-message-function
      show-trailing-whitespace smtpmail-default-smtp-server
      temporary-file-directory tool-bar-mode transient-mark-mode url-version
-     w3-meta-charset-content-type-regexp w3m-link-map
-     w3-meta-content-type-charset-regexp))
+     w3m-link-map))
 
   (when (or (and (= emacs-major-version 21) (= emacs-minor-version 4))
            (featurep 'sxemacs))
index 5515a34..4f1bdf4 100644 (file)
@@ -215,10 +215,6 @@ This is a compatibility function for different Emacsen."
       (viewer . vm-mode)
       (test   . (fboundp 'vm-mode))
       (type   . "message/rfc822"))
-     ("rfc-*822"
-      (viewer . w3-mode)
-      (test   . (fboundp 'w3-mode))
-      (type   . "message/rfc822"))
      ("rfc-*822"
       (viewer . view-mode)
       (type   . "message/rfc822")))
@@ -252,10 +248,6 @@ This is a compatibility function for different Emacsen."
       (test   . (eq window-system 'x))
       ("needsx11")))
     ("text"
-     ("plain"
-      (viewer  . w3-mode)
-      (test    . (fboundp 'w3-mode))
-      (type    . "text/plain"))
      ("plain"
       (viewer  . view-mode)
       (test    . (fboundp 'view-mode))
@@ -267,10 +259,6 @@ This is a compatibility function for different Emacsen."
       (viewer . enriched-decode)
       (test   . (fboundp 'enriched-decode))
       (type   . "text/enriched"))
-     ("html"
-      (viewer . mm-w3-prepare-buffer)
-      (test   . (fboundp 'w3-prepare-buffer))
-      (type   . "text/html"))
      ("dns"
       (viewer . dns-mode)
       (test   . (fboundp 'dns-mode))
index 17c8fb1..fee48fd 100644 (file)
        ((executable-find "w3m") 'gnus-w3m)
        ((executable-find "links") 'links)
        ((executable-find "lynx") 'lynx)
-       ((locate-library "w3") 'w3)
        ((locate-library "html2text") 'html2text)
        (t nil))
   "Render of HTML contents.
@@ -136,13 +135,11 @@ The defined renderer types are:
 `w3m-standalone': use plain w3m;
 `links': use links;
 `lynx': use lynx;
-`w3': use Emacs/W3;
 `html2text': use html2text;
 nil    : use external viewer (default web browser)."
   :version "24.1"
   :type '(choice (const shr)
                  (const gnus-w3m)
-                 (const w3)
                  (const w3m :tag "emacs-w3m")
                 (const w3m-standalone :tag "standalone w3m" )
                 (const links)
@@ -153,9 +150,9 @@ nil    : use external viewer (default web browser)."
   :group 'mime-display)
 
 (defcustom mm-inline-text-html-with-images nil
-  "If non-nil, Gnus will allow retrieving images in HTML contents with
-the <img> tags.  It has no effect on Emacs/w3.  See also the
-documentation for the `mm-w3m-safe-url-regexp' variable."
+  "If non-nil, Gnus will allow retrieving images in HTML that has <img> tags.
+See also the documentation for the `mm-w3m-safe-url-regexp'
+variable."
   :version "22.1"
   :type 'boolean
   :group 'mime-display)
index 4b46ab7..bb342d6 100644 (file)
@@ -21,7 +21,7 @@
 
 ;;; 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.
@@ -264,8 +264,6 @@ This is taken from RFC 2396.")
                (require 'url-parse)
                (require 'url-vars))
            (error nil))
-    ;; w3-4.0pre0.46 or earlier version.
-    (require 'w3-vars)
     (require 'url)))
 
 ;;;###autoload
index a764fa5..99594a2 100644 (file)
@@ -51,7 +51,6 @@
 
 (defvar mm-text-html-renderer-alist
   '((shr . mm-shr)
-    (w3 . mm-inline-text-html-render-with-w3)
     (w3m . mm-inline-text-html-render-with-w3m)
     (w3m-standalone . mm-inline-text-html-render-with-w3m-standalone)
     (gnus-w3m . gnus-article-html)
       (defalias 'mm-inline-image 'mm-inline-image-xemacs)
     (defalias 'mm-inline-image 'mm-inline-image-emacs)))
 
-;; External.
-(declare-function w3-do-setup       "ext:w3"         ())
-(declare-function w3-region         "ext:w3-display" (st nd))
-(declare-function w3-prepare-buffer "ext:w3-display" (&rest args))
-
-(defvar mm-w3-setup nil)
-(defun mm-setup-w3 ()
-  (unless mm-w3-setup
-    (require 'w3)
-    (w3-do-setup)
-    (require 'url)
-    (require 'w3-vars)
-    (require 'url-vars)
-    (setq mm-w3-setup t)))
-
-(defun mm-inline-text-html-render-with-w3 (handle)
-  (mm-setup-w3)
-  (let ((text (mm-get-part handle))
-       (b (point))
-       (url-standalone-mode t)
-       (url-gateway-unplugged t)
-       (w3-honor-stylesheets nil)
-       (url-current-object
-        (url-generic-parse-url (format "cid:%s" (mm-handle-id handle))))
-       (width (window-width))
-       (charset (mail-content-type-get
-                 (mm-handle-type handle) 'charset)))
-    (save-excursion
-      (insert (if charset (mm-decode-string text charset) text))
-      (save-restriction
-       (narrow-to-region b (point))
-       (unless charset
-         (goto-char (point-min))
-         (when (or (and (boundp 'w3-meta-content-type-charset-regexp)
-                        (re-search-forward
-                         w3-meta-content-type-charset-regexp nil t))
-                   (and (boundp 'w3-meta-charset-content-type-regexp)
-                        (re-search-forward
-                         w3-meta-charset-content-type-regexp nil t)))
-           (setq charset
-                 (let ((bsubstr (buffer-substring-no-properties
-                                 (match-beginning 2)
-                                 (match-end 2))))
-                   (if (fboundp 'w3-coding-system-for-mime-charset)
-                       (w3-coding-system-for-mime-charset bsubstr)
-                     (mm-charset-to-coding-system bsubstr nil t))))
-           (delete-region (point-min) (point-max))
-           (insert (mm-decode-string text charset))))
-       (save-window-excursion
-         (save-restriction
-           (let ((w3-strict-width width)
-                 ;; Don't let w3 set the global version of
-                 ;; this variable.
-                 (fill-column fill-column))
-             (if (or debug-on-error debug-on-quit)
-                 (w3-region (point-min) (point-max))
-               (condition-case ()
-                   (w3-region (point-min) (point-max))
-                 (error
-                  (delete-region (point-min) (point-max))
-                  (let ((b (point))
-                        (charset (mail-content-type-get
-                                  (mm-handle-type handle) 'charset)))
-                    (if (or (eq charset 'gnus-decoded)
-                            (eq mail-parse-charset 'gnus-decoded))
-                      (save-restriction
-                        (narrow-to-region (point) (point))
-                        (mm-insert-part handle)
-                        (goto-char (point-max)))
-                      (insert (mm-decode-string (mm-get-part handle)
-                                                charset))))
-                  (message
-                   "Error while rendering html; showing as text/plain")))))))
-       (mm-handle-set-undisplayer
-        handle
-        `(lambda ()
-           (let ((inhibit-read-only t))
-             ,@(if (functionp 'remove-specifier)
-                    '((dolist (prop '(background background-pixmap foreground))
-                        (remove-specifier
-                         (face-property 'default prop)
-                         (current-buffer)))))
-             (delete-region ,(point-min-marker)
-                            ,(point-max-marker)))))))))
-
 (defvar mm-w3m-setup nil
   "Whether gnus-article-mode has been setup to use emacs-w3m.")
 
 (defun mm-inline-audio (handle)
   (message "Not implemented"))
 
-(defun mm-w3-prepare-buffer ()
-  (require 'w3)
-  (let ((url-standalone-mode t)
-       (url-gateway-unplugged t)
-       (w3-honor-stylesheets nil))
-    (w3-prepare-buffer)))
-
 (defun mm-view-message ()
   (mm-enable-multibyte)
   (let (handles)
index 5ef91d0..63d5c4f 100644 (file)
@@ -398,8 +398,6 @@ otherwise return nil."
                                         nnrss-compatible-encoding-alist)))))
     (mm-coding-system-p 'utf-8)))
 
-(declare-function w3-parse-buffer "ext:w3-parse" (&optional buff))
-
 (defun nnrss-fetch (url &optional local)
   "Fetch URL and put it in a the expected Lisp structure."
   (mm-with-unibyte-buffer
@@ -426,22 +424,14 @@ otherwise return nil."
                  (mm-enable-multibyte))))
       (goto-char (point-min))
 
-      ;; Because xml-parse-region can't deal with anything that isn't
-      ;; xml and w3-parse-buffer can't deal with some xml, we have to
-      ;; parse with xml-parse-region first and, if that fails, parse
-      ;; with w3-parse-buffer.  Yuck.  Eventually, someone should find out
-      ;; why w3-parse-buffer fails to parse some well-formed xml and
-      ;; fix it.
-
       (condition-case err1
          (setq xmlform (xml-parse-region (point-min) (point-max)))
        (error
         (condition-case err2
-            (setq htmlform (caddar (w3-parse-buffer
-                                    (current-buffer))))
+            (setq htmlform (libxml-parse-html-region (point-min) (point-max)))
           (error
            (message "\
-nnrss: %s: Not valid XML %s and w3-parse doesn't work %s"
+nnrss: %s: Not valid XML %s and libxml-parse-html-region doesn't work %s"
                     url err1 err2)))))
       (if htmlform
          htmlform
@@ -599,7 +589,7 @@ which RSS 2.0 allows."
 (defun nnrss-no-cache (url)
   "")
 
-(defun nnrss-insert-w3 (url)
+(defun nnrss-insert (url)
   (mm-with-unibyte-current-buffer
     (condition-case err
        (mm-url-insert url)
@@ -614,8 +604,6 @@ which RSS 2.0 allows."
        (mm-url-decode-entities-nbsp)
        (buffer-string))))
 
-(defalias 'nnrss-insert 'nnrss-insert-w3)
-
 (defun nnrss-mime-encode-string (string)
   (mm-with-multibyte-buffer
     (insert string)
@@ -880,8 +868,7 @@ Careful with this on large documents!"
 
 (defun nnrss-extract-hrefs (data)
   "Recursively extract hrefs from a page's source.
-DATA should be the output of `xml-parse-region' or
-`w3-parse-buffer'."
+DATA should be the output of `xml-parse-region'."
   (mapcar (lambda (ahref)
            (cdr (assoc 'href (cadr ahref))))
          (nnrss-find-el 'a data)))
index 3fb35b2..e909372 100644 (file)
@@ -22,8 +22,6 @@
 
 ;;; Commentary:
 
-;; Note: You need to have `w3' installed for some functions to work.
-
 ;;; Code:
 
 (eval-when-compile (require 'cl))
@@ -38,7 +36,6 @@
 (eval-and-compile
   (ignore-errors
     (require 'url)))
-(autoload 'w3-parse-buffer "w3-parse")
 
 (nnoo-declare nnweb)
 
@@ -527,7 +524,7 @@ Valid types include `google', `dejanews', and `gmane'.")
     url))
 
 ;;;
-;;; General web/w3 interface utility functions
+;;; General web interface utility functions
 ;;;
 
 (defun nnweb-insert-html (parse)
index b1d7a23..f305b09 100644 (file)
--- a/make.bat
+++ b/make.bat
@@ -322,10 +322,6 @@ echo *        /copy indicates that the compiled files should be copied to your
 echo *           emacs lisp, info, and etc site directories.\r
 REM echo *        ^> inst-log.txt 2^>^&1\r
 REM echo *           Log output to inst-log.txt\r
-echo *\r
-echo * Note: If you have Emacs/w3 you should set the environment variable\r
-echo *       W3DIR to the directory where w3 is installed eg.\r
-echo *                set W3DIR=d:\lisp\w3-4.0pre46\lisp\r
 echo ***************************************************************************\r
 echo.\r
 \r