projects
/
elisp
/
gnus.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Synch to No Gnus 200510111141.
[elisp/gnus.git-]
/
lisp
/
nnwfm.el
diff --git
a/lisp/nnwfm.el
b/lisp/nnwfm.el
index
99eb421
..
cc0bb70
100644
(file)
--- a/
lisp/nnwfm.el
+++ b/
lisp/nnwfm.el
@@
-1,5
+1,6
@@
;;; nnwfm.el --- interfacing with a web forum
;;; nnwfm.el --- interfacing with a web forum
-;; Copyright (C) 2000 Free Software Foundation, Inc.
+
+;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
@@
-18,8
+19,8
@@
;; 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
;; 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.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; Commentary:
@@
-29,7
+30,6
@@
;;; Code:
(eval-when-compile (require 'cl))
;;; Code:
(eval-when-compile (require 'cl))
-(eval-when-compile (require 'gnus-clfns))
(require 'nnoo)
(require 'message)
(require 'nnoo)
(require 'message)
@@
-37,11
+37,9
@@
(require 'gnus)
(require 'nnmail)
(require 'mm-util)
(require 'gnus)
(require 'nnmail)
(require 'mm-util)
-(eval-when-compile
- (ignore-errors
- (require 'nnweb)))
-;; Report failure to find w3 at load time if appropriate.
-(eval '(require 'nnweb))
+(require 'mm-url)
+(require 'nnweb)
+(autoload 'w3-parse-buffer "w3-parse")
(nnoo-declare nnwfm)
(nnoo-declare nnwfm)
@@
-57,7
+55,7
@@
(defvoo nnwfm-groups nil)
(defvoo nnwfm-headers nil)
(defvoo nnwfm-articles nil)
(defvoo nnwfm-groups nil)
(defvoo nnwfm-headers nil)
(defvoo nnwfm-articles nil)
-(defvar nnwfm-table-regexp
+(defvar nnwfm-table-regexp
"postings.*editpost\\|forumdisplay\\|Forum[0-9]+/HTML\\|getbio")
;;; Interface functions
"postings.*editpost\\|forumdisplay\\|Forum[0-9]+/HTML\\|getbio")
;;; Interface functions
@@
-117,7
+115,7
@@
(erase-buffer)
(setq subject (nth 2 (assq (car elem) topics))
thread-id (nth 0 (assq (car elem) topics)))
(erase-buffer)
(setq subject (nth 2 (assq (car elem) topics))
thread-id (nth 0 (assq (car elem) topics)))
- (nnweb-insert
+ (mm-url-insert
(concat nnwfm-address
(format "Item.asp?GroupID=%d&ThreadID=%d" sid
thread-id)))
(concat nnwfm-address
(format "Item.asp?GroupID=%d&ThreadID=%d" sid
thread-id)))
@@
-141,10
+139,10
@@
(push (list from time bstuff) contents))))
(setq contents (nreverse contents))
(dolist (art (cdr elem))
(push (list from time bstuff) contents))))
(setq contents (nreverse contents))
(dolist (art (cdr elem))
- (push (list (car art)
- (nth (1- (cdr art)) contents)
- subject)
- nnwfm-articles))))
+ (push (list (car art)
+ (nth (1- (cdr art)) contents)
+ subject)
+ nnwfm-articles))))
(setq nnwfm-articles
(sort nnwfm-articles 'car-less-than-car))
;; Now we have all the articles, conveniently in an alist
(setq nnwfm-articles
(sort nnwfm-articles 'car-less-than-car))
;; Now we have all the articles, conveniently in an alist
@@
-217,7
+215,7
@@
(deffoo nnwfm-request-list (&optional server)
(nnwfm-possibly-change-server nil server)
(mm-with-unibyte-buffer
(deffoo nnwfm-request-list (&optional server)
(nnwfm-possibly-change-server nil server)
(mm-with-unibyte-buffer
- (nnweb-insert
+ (mm-url-insert
(if (string-match "/$" nnwfm-address)
(concat nnwfm-address "Group.asp")
nnwfm-address))
(if (string-match "/$" nnwfm-address)
(concat nnwfm-address "Group.asp")
nnwfm-address))
@@
-234,7
+232,7
@@
(setq description (car (last (nnweb-text (nth 1 row)))))
(setq articles
(string-to-number
(setq description (car (last (nnweb-text (nth 1 row)))))
(setq articles
(string-to-number
- (nnweb-replace-in-string
+ (gnus-replace-in-string
(car (last (nnweb-text (nth 3 row)))) "," "")))
(when (and href
(string-match "GroupId=\\([0-9]+\\)" href))
(car (last (nnweb-text (nth 3 row)))) "," "")))
(when (and href
(string-match "GroupId=\\([0-9]+\\)" href))
@@
-280,12
+278,12
@@
(while furls
(erase-buffer)
(push (car furls) fetched-urls)
(while furls
(erase-buffer)
(push (car furls) fetched-urls)
- (nnweb-insert (pop furls))
+ (mm-url-insert (pop furls))
(goto-char (point-min))
(while (re-search-forward " wr(" nil t)
(forward-char -1)
(setq elem (message-tokenize-header
(goto-char (point-min))
(while (re-search-forward " wr(" nil t)
(forward-char -1)
(setq elem (message-tokenize-header
- (nnweb-replace-in-string
+ (gnus-replace-in-string
(buffer-substring
(1+ (point))
(progn
(buffer-substring
(1+ (point))
(progn
@@
-294,18
+292,19
@@
"\\\\[\"\\\\]" "")))
(push (list
(string-to-number (nth 1 elem))
"\\\\[\"\\\\]" "")))
(push (list
(string-to-number (nth 1 elem))
- (nnweb-replace-in-string (nth 2 elem) "\"" "")
+ (gnus-replace-in-string (nth 2 elem) "\"" "")
(string-to-number (nth 5 elem)))
forum-contents))
(when (re-search-forward "href=\"\\(Thread.*DateLast=\\([^\"]+\\)\\)"
nil t)
(setq url (match-string 1)
(string-to-number (nth 5 elem)))
forum-contents))
(when (re-search-forward "href=\"\\(Thread.*DateLast=\\([^\"]+\\)\\)"
nil t)
(setq url (match-string 1)
- time (nnwfm-date-to-time (url-unhex-string (match-string 2))))
+ time (nnwfm-date-to-time (gnus-url-unhex-string
+ (match-string 2))))
(when (and (nnwfm-new-threads-p group time)
(not (member
(setq url (concat
nnwfm-address
(when (and (nnwfm-new-threads-p group time)
(not (member
(setq url (concat
nnwfm-address
- (nnweb-decode-entities-string url)))
+ (mm-url-decode-entities-string url)))
fetched-urls)))
(push url furls))))
;; The main idea here is to map Gnus article numbers to
fetched-urls)))
(push url furls))))
;; The main idea here is to map Gnus article numbers to
@@
-351,7
+350,7
@@
(unless nnwfm-groups-alist
(nnwfm-read-groups)
(setq nnwfm-groups (cdr (assoc nnwfm-address
(unless nnwfm-groups-alist
(nnwfm-read-groups)
(setq nnwfm-groups (cdr (assoc nnwfm-address
- nnwfm-groups-alist)))))
+ nnwfm-groups-alist)))))
(deffoo nnwfm-open-server (server &optional defs connectionless)
(nnheader-init-server-buffer)
(deffoo nnwfm-open-server (server &optional defs connectionless)
(nnheader-init-server-buffer)
@@
-378,7
+377,7
@@
nnwfm-groups-alist)
(with-temp-file (expand-file-name "groups" nnwfm-directory)
(prin1 nnwfm-groups-alist (current-buffer))))
nnwfm-groups-alist)
(with-temp-file (expand-file-name "groups" nnwfm-directory)
(prin1 nnwfm-groups-alist (current-buffer))))
-
+
(defun nnwfm-init (server)
"Initialize buffers and such."
(unless (file-exists-p nnwfm-directory)
(defun nnwfm-init (server)
"Initialize buffers and such."
(unless (file-exists-p nnwfm-directory)