aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShengHuo ZHU2001-02-02 03:15:52 +0000
committerShengHuo ZHU2001-02-02 03:15:52 +0000
commit676a7cc97d92e55ed4fc7c1f0bb094f625c449b7 (patch)
treec6df0bcf2c4cef5f621675c4b7ced1072d8fa9f0
parentf8f96fe285dfe6806159c9d78dcfad23671526a9 (diff)
downloademacs-676a7cc97d92e55ed4fc7c1f0bb094f625c449b7.tar.gz
emacs-676a7cc97d92e55ed4fc7c1f0bb094f625c449b7.zip
2001-02-01 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-score.el (gnus-summary-score-entry): match may be an integer. * gnus-art.el (gnus-summary-save-in-pipe): Prompt for saving command if there is not last-saver. * rfc2047.el (rfc2047-encode): MIME charset is not coding system. (rfc2047-charset-encoding-alist): Add big5. * mm-util.el (mm-mime-mule-charset-alist): Preferred MIME names GB2312 and Big5. * gnus-score.el (gnus-score-lower-thread): Fix a doc typo. * gnus-sum.el (gnus-summary-print-article): Remove process mark. * gnus-sum.el (gnus-summary-print-article): Take one prefix argument. Allow to print several articles in one file. * webmail.el (webmail-type-definition): netaddress changes.
-rw-r--r--lisp/gnus/ChangeLog22
-rw-r--r--lisp/gnus/gnus-art.el7
-rw-r--r--lisp/gnus/gnus-score.el18
-rw-r--r--lisp/gnus/gnus-sum.el11
-rw-r--r--lisp/gnus/mm-util.el4
-rw-r--r--lisp/gnus/rfc2047.el7
-rw-r--r--lisp/gnus/webmail.el174
7 files changed, 136 insertions, 107 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 1f1027b1e40..7f76c0dc739 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,25 @@
12001-02-01 ShengHuo ZHU <zsh@cs.rochester.edu>
2
3 * gnus-score.el (gnus-summary-score-entry): match may be an integer.
4
5 * gnus-art.el (gnus-summary-save-in-pipe): Prompt for saving
6 command if there is not last-saver.
7
8 * rfc2047.el (rfc2047-encode): MIME charset is not coding system.
9 (rfc2047-charset-encoding-alist): Add big5.
10
11 * mm-util.el (mm-mime-mule-charset-alist): Preferred MIME names
12 GB2312 and Big5.
13
14 * gnus-score.el (gnus-score-lower-thread): Fix a doc typo.
15
16 * gnus-sum.el (gnus-summary-print-article): Remove process mark.
17
18 * gnus-sum.el (gnus-summary-print-article): Take one prefix
19 argument. Allow to print several articles in one file.
20
21 * webmail.el (webmail-type-definition): netaddress changes.
22
12001-01-31 Dave Love <fx@gnu.org> 232001-01-31 Dave Love <fx@gnu.org>
2 24
3 * mm-util.el (mm-mime-mule-charset-alist) 25 * mm-util.el (mm-mime-mule-charset-alist)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 008b790b7ac..55e51d8c128 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -2493,7 +2493,8 @@ The directory to save in defaults to `gnus-article-save-directory'."
2493 (cond ((and (eq command 'default) 2493 (cond ((and (eq command 'default)
2494 gnus-last-shell-command) 2494 gnus-last-shell-command)
2495 gnus-last-shell-command) 2495 gnus-last-shell-command)
2496 (command command) 2496 ((stringp command)
2497 command)
2497 (t (read-string 2498 (t (read-string
2498 (format 2499 (format
2499 "Shell command on %s: " 2500 "Shell command on %s: "
@@ -2504,7 +2505,9 @@ The directory to save in defaults to `gnus-article-save-directory'."
2504 "this article")) 2505 "this article"))
2505 gnus-last-shell-command)))) 2506 gnus-last-shell-command))))
2506 (when (string-equal command "") 2507 (when (string-equal command "")
2507 (setq command gnus-last-shell-command)) 2508 (if gnus-last-shell-command
2509 (setq command gnus-last-shell-command)
2510 (error "A command is required.")))
2508 (gnus-eval-in-buffer-window gnus-article-buffer 2511 (gnus-eval-in-buffer-window gnus-article-buffer
2509 (save-restriction 2512 (save-restriction
2510 (widen) 2513 (widen)
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index c6ddb5bf1fd..213178320ab 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1,5 +1,5 @@
1;;; gnus-score.el --- scoring code for Gnus 1;;; gnus-score.el --- scoring code for Gnus
2;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 2;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Per Abrahamsen <amanda@iesd.auc.dk> 5;; Author: Per Abrahamsen <amanda@iesd.auc.dk>
@@ -808,11 +808,11 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header."
808 (int-to-string match) 808 (int-to-string match)
809 match)))) 809 match))))
810 810
811 (set-text-properties 0 (length match) nil match)
812
813 ;; If this is an integer comparison, we transform from string to int. 811 ;; If this is an integer comparison, we transform from string to int.
814 (when (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) 812 (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer)
815 (setq match (string-to-int match))) 813 (if (stringp match)
814 (setq match (string-to-int match)))
815 (set-text-properties 0 (length match) nil match))
816 816
817 (unless (eq date 'now) 817 (unless (eq date 'now)
818 ;; Add the score entry to the score file. 818 ;; Add the score entry to the score file.
@@ -1492,7 +1492,7 @@ EXTRA is the possible non-standard header."
1492 (gnus-message 5 "Scoring...done")))))) 1492 (gnus-message 5 "Scoring...done"))))))
1493 1493
1494(defun gnus-score-lower-thread (thread score-adjust) 1494(defun gnus-score-lower-thread (thread score-adjust)
1495 "Lower the socre on THREAD with SCORE-ADJUST. 1495 "Lower the score on THREAD with SCORE-ADJUST.
1496THREAD is expected to contain a list of the form `(PARENT [CHILD1 1496THREAD is expected to contain a list of the form `(PARENT [CHILD1
1497CHILD2 ...])' where PARENT is a header array and each CHILD is a list 1497CHILD2 ...])' where PARENT is a header array and each CHILD is a list
1498of the same form as THREAD. The empty list `nil' is valid. For each 1498of the same form as THREAD. The empty list `nil' is valid. For each
@@ -1750,7 +1750,7 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
1750 ;; gnus-score-index is used as a free variable. 1750 ;; gnus-score-index is used as a free variable.
1751 alike last this art entries alist articles 1751 alike last this art entries alist articles
1752 new news) 1752 new news)
1753 1753
1754 ;; Change score file to the adaptive score file. All entries that 1754 ;; Change score file to the adaptive score file. All entries that
1755 ;; this function makes will be put into this file. 1755 ;; this function makes will be put into this file.
1756 (save-excursion 1756 (save-excursion
@@ -1760,7 +1760,7 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
1760 (gnus-score-file-name 1760 (gnus-score-file-name
1761 gnus-newsgroup-name gnus-adaptive-file-suffix)))) 1761 gnus-newsgroup-name gnus-adaptive-file-suffix))))
1762 1762
1763 (setq gnus-scores-articles (sort gnus-scores-articles 1763 (setq gnus-scores-articles (sort gnus-scores-articles
1764 'gnus-score-string<) 1764 'gnus-score-string<)
1765 articles gnus-scores-articles) 1765 articles gnus-scores-articles)
1766 1766
@@ -1829,7 +1829,7 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
1829 (push new news))))) 1829 (push new news)))))
1830 ;; Update expire date 1830 ;; Update expire date
1831 (cond ((null date)) ;Permanent entry. 1831 (cond ((null date)) ;Permanent entry.
1832 ((and found gnus-update-score-entry-dates) 1832 ((and found gnus-update-score-entry-dates)
1833 ;Match, update date. 1833 ;Match, update date.
1834 (gnus-score-set 'touched '(t) alist) 1834 (gnus-score-set 'touched '(t) alist)
1835 (setcar (nthcdr 2 kill) now)) 1835 (setcar (nthcdr 2 kill) now))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 697224c1607..6ffecba1bd4 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1,5 +1,5 @@
1;;; gnus-sum.el --- summary mode commands for Gnus 1;;; gnus-sum.el --- summary mode commands for Gnus
2;; Copyright (C) 1996, 1997, 1998, 1999, 2000 2;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3;; Free Software Foundation, Inc. 3;; Free Software Foundation, Inc.
4 4
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7301,8 +7301,7 @@ If the optional first argument FILENAME is nil, send the image to the
7301printer. If FILENAME is a string, save the PostScript image in a file with 7301printer. If FILENAME is a string, save the PostScript image in a file with
7302that name. If FILENAME is a number, prompt the user for the name of the file 7302that name. If FILENAME is a number, prompt the user for the name of the file
7303to save in." 7303to save in."
7304 (interactive (list (ps-print-preprint current-prefix-arg) 7304 (interactive (list (ps-print-preprint current-prefix-arg)))
7305 current-prefix-arg))
7306 (dolist (article (gnus-summary-work-articles n)) 7305 (dolist (article (gnus-summary-work-articles n))
7307 (gnus-summary-select-article nil nil 'pseudo article) 7306 (gnus-summary-select-article nil nil 'pseudo article)
7308 (gnus-eval-in-buffer-window gnus-article-buffer 7307 (gnus-eval-in-buffer-window gnus-article-buffer
@@ -7325,8 +7324,10 @@ to save in."
7325 (mail-header-date gnus-current-headers) ")")))) 7324 (mail-header-date gnus-current-headers) ")"))))
7326 (gnus-run-hooks 'gnus-ps-print-hook) 7325 (gnus-run-hooks 'gnus-ps-print-hook)
7327 (save-excursion 7326 (save-excursion
7328 (ps-print-buffer-with-faces filename)))) 7327 (ps-spool-buffer-with-faces))))
7329 (kill-buffer buffer)))))) 7328 (kill-buffer buffer))))
7329 (gnus-summary-remove-process-mark article))
7330 (ps-despool filename))
7330 7331
7331(defun gnus-summary-show-article (&optional arg) 7332(defun gnus-summary-show-article (&optional arg)
7332 "Force re-fetching of the current article. 7333 "Force re-fetching of the current article.
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 196d1d0039d..e083c052497 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -47,8 +47,8 @@
47 (viscii vietnamese-viscii-lower) 47 (viscii vietnamese-viscii-lower)
48 (iso-2022-jp latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978) 48 (iso-2022-jp latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978)
49 (euc-kr korean-ksc5601) 49 (euc-kr korean-ksc5601)
50 (cn-gb-2312 chinese-gb2312) 50 (gb2312 chinese-gb2312)
51 (cn-big5 chinese-big5-1 chinese-big5-2) 51 (big5 chinese-big5-1 chinese-big5-2)
52 (tibetan tibetan) 52 (tibetan tibetan)
53 (thai-tis620 thai-tis620) 53 (thai-tis620 thai-tis620)
54 (iso-2022-7bit ethiopic arabic-1-column arabic-2-column) 54 (iso-2022-7bit ethiopic arabic-1-column arabic-2-column)
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el
index f171ba4e068..c6849de37ba 100644
--- a/lisp/gnus/rfc2047.el
+++ b/lisp/gnus/rfc2047.el
@@ -70,6 +70,8 @@ The values can be:
70 (iso-2022-jp . B) 70 (iso-2022-jp . B)
71 (iso-2022-kr . B) 71 (iso-2022-kr . B)
72 (gb2312 . B) 72 (gb2312 . B)
73 (big5 . B)
74 (cn-big5 . B)
73 (cn-gb . B) 75 (cn-gb . B)
74 (cn-gb-2312 . B) 76 (cn-gb-2312 . B)
75 (euc-kr . B) 77 (euc-kr . B)
@@ -258,6 +260,7 @@ The buffer may be narrowed."
258(defun rfc2047-encode (b e charset) 260(defun rfc2047-encode (b e charset)
259 "Encode the word in the region B to E with CHARSET." 261 "Encode the word in the region B to E with CHARSET."
260 (let* ((mime-charset (mm-mime-charset charset)) 262 (let* ((mime-charset (mm-mime-charset charset))
263 (cs (mm-charset-to-coding-system mime-charset))
261 (encoding (or (cdr (assq mime-charset 264 (encoding (or (cdr (assq mime-charset
262 rfc2047-charset-encoding-alist)) 265 rfc2047-charset-encoding-alist))
263 'B)) 266 'B))
@@ -275,8 +278,8 @@ The buffer may be narrowed."
275 (unless (eobp) 278 (unless (eobp)
276 (insert "\n")))) 279 (insert "\n"))))
277 (if (and (mm-multibyte-p) 280 (if (and (mm-multibyte-p)
278 (mm-coding-system-p mime-charset)) 281 (mm-coding-system-p cs))
279 (mm-encode-coding-region (point-min) (point-max) mime-charset)) 282 (mm-encode-coding-region (point-min) (point-max) cs))
280 (funcall (cdr (assq encoding rfc2047-encoding-function-alist)) 283 (funcall (cdr (assq encoding rfc2047-encoding-function-alist))
281 (point-min) (point-max)) 284 (point-min) (point-max))
282 (goto-char (point-min)) 285 (goto-char (point-min))
diff --git a/lisp/gnus/webmail.el b/lisp/gnus/webmail.el
index d947ca03d93..32d89fc921b 100644
--- a/lisp/gnus/webmail.el
+++ b/lisp/gnus/webmail.el
@@ -1,5 +1,5 @@
1;;; webmail.el --- interfacing with web mail 1;;; webmail.el --- interface of web mail
2;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. 2;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> 4;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
5;; Keywords: hotmail netaddress my-deja netscape 5;; Keywords: hotmail netaddress my-deja netscape
@@ -32,7 +32,7 @@
32 32
33;; Todo: To support more web mail servers. 33;; Todo: To support more web mail servers.
34 34
35;; Known bugs: 35;; Known bugs:
36;; 1. Net@ddress may corrupt `X-Face'. 36;; 1. Net@ddress may corrupt `X-Face'.
37 37
38;; Warning: 38;; Warning:
@@ -81,8 +81,8 @@
81 ;;(list-url "%s" webmail-aux) 81 ;;(list-url "%s" webmail-aux)
82 (list-snarf . webmail-hotmail-list) 82 (list-snarf . webmail-hotmail-list)
83 (article-snarf . webmail-hotmail-article) 83 (article-snarf . webmail-hotmail-article)
84 (trash-url 84 (trash-url
85 "%s&login=%s&f=33792&curmbox=ACTIVE&_lang=&foo=inbox&js=&page=&%s=on&_HMaction=MoveTo&tobox=trAsH&nullbox=" 85 "%s&login=%s&f=33792&curmbox=ACTIVE&_lang=&foo=inbox&js=&page=&%s=on&_HMaction=MoveTo&tobox=trAsH&nullbox="
86 webmail-aux user id)) 86 webmail-aux user id))
87 (yahoo 87 (yahoo
88 (paranoid agent cookie post) 88 (paranoid agent cookie post)
@@ -90,7 +90,7 @@
90 (open-url "http://mail.yahoo.com/") 90 (open-url "http://mail.yahoo.com/")
91 (open-snarf . webmail-yahoo-open) 91 (open-snarf . webmail-yahoo-open)
92 (login-url;; yahoo will not accept GET 92 (login-url;; yahoo will not accept GET
93 content 93 content
94 ("%s" webmail-aux) 94 ("%s" webmail-aux)
95 ".tries=&.src=ym&.last=&promo=&.intl=&.bypass=&.partner=&.chkP=Y&.done=&login=%s&passwd=%s" 95 ".tries=&.src=ym&.last=&promo=&.intl=&.bypass=&.partner=&.chkP=Y&.done=&login=%s&passwd=%s"
96 user password) 96 user password)
@@ -98,7 +98,7 @@
98 (list-url "%s&rb=Inbox&YN=1" webmail-aux) 98 (list-url "%s&rb=Inbox&YN=1" webmail-aux)
99 (list-snarf . webmail-yahoo-list) 99 (list-snarf . webmail-yahoo-list)
100 (article-snarf . webmail-yahoo-article) 100 (article-snarf . webmail-yahoo-article)
101 (trash-url 101 (trash-url
102 "%s/ym/ShowFolder?YY=52107&inc=50&order=down&sort=date&pos=0&box=Inbox&DEL=Delete&destBox=&Mid=%s&destBox2=" 102 "%s/ym/ShowFolder?YY=52107&inc=50&order=down&sort=date&pos=0&box=Inbox&DEL=Delete&destBox=&Mid=%s&destBox2="
103 webmail-aux id)) 103 webmail-aux id))
104 (netaddress 104 (netaddress
@@ -107,18 +107,18 @@
107 (open-url "http://www.netaddress.com/") 107 (open-url "http://www.netaddress.com/")
108 (open-snarf . webmail-netaddress-open) 108 (open-snarf . webmail-netaddress-open)
109 (login-url 109 (login-url
110 content 110 content
111 ("%s" webmail-aux) 111 ("%s" webmail-aux)
112 "LoginState=2&SuccessfulLogin=%%2Ftpl&NewServerName=www.netaddress.com&JavaScript=JavaScript1.2&DomainID=4&NA31site=classic.netaddress.com&NA31port=80&UserID=%s&passwd=%s" 112 "LoginState=2&SuccessfulLogin=%%2Ftpl&NewServerName=www.netaddress.com&JavaScript=JavaScript1.2&DomainID=4&Domain=usa.net&NA31site=classic.netaddress.com&NA31port=80&UserID=%s&passwd=%s"
113 user password) 113 user password)
114 (login-snarf . webmail-netaddress-login) 114 (login-snarf . webmail-netaddress-login)
115 (list-url 115 (list-url
116 "http://www.netaddress.com/tpl/Mail/%s/List?FolderID=-4&SortUseCase=True" 116 "http://www.netaddress.com/tpl/Mail/%s/List?FolderID=-4&SortUseCase=True"
117 webmail-session) 117 webmail-session)
118 (list-snarf . webmail-netaddress-list) 118 (list-snarf . webmail-netaddress-list)
119 (article-url "http://www.netaddress.com/") 119 (article-url "http://www.netaddress.com/")
120 (article-snarf . webmail-netaddress-article) 120 (article-snarf . webmail-netaddress-article)
121 (trash-url 121 (trash-url
122 "http://www.netaddress.com/tpl/Message/%s/Move?FolderID=-4&Q=%s&N=&Sort=Date&F=-1" 122 "http://www.netaddress.com/tpl/Message/%s/Move?FolderID=-4&Q=%s&N=&Sort=Date&F=-1"
123 webmail-session id)) 123 webmail-session id))
124 (netscape 124 (netscape
@@ -127,18 +127,18 @@
127 (open-url "http://ureg.netscape.com/iiop/UReg2/login/login?U2_LA=en&U2_BACK_FROM_CJ=true&U2_CS=iso-8859-1&U2_ENDURL=http://webmail.netscape.com/tpl/Subscribe/Step1&U2_NEW_ENDURL=http://webmail.netscape.com/tpl/Subscribe/Step1&U2_EXITURL=http://home.netscape.com/&U2_SOURCE=Webmail") 127 (open-url "http://ureg.netscape.com/iiop/UReg2/login/login?U2_LA=en&U2_BACK_FROM_CJ=true&U2_CS=iso-8859-1&U2_ENDURL=http://webmail.netscape.com/tpl/Subscribe/Step1&U2_NEW_ENDURL=http://webmail.netscape.com/tpl/Subscribe/Step1&U2_EXITURL=http://home.netscape.com/&U2_SOURCE=Webmail")
128 (open-snarf . webmail-netscape-open) 128 (open-snarf . webmail-netscape-open)
129 (login-url 129 (login-url
130 content 130 content
131 ("http://ureg.netscape.com/iiop/UReg2/login/loginform") 131 ("http://ureg.netscape.com/iiop/UReg2/login/loginform")
132 "U2_USERNAME=%s&U2_PASSWORD=%s%s" 132 "U2_USERNAME=%s&U2_PASSWORD=%s%s"
133 user password webmail-aux) 133 user password webmail-aux)
134 (login-snarf . webmail-netaddress-login) 134 (login-snarf . webmail-netaddress-login)
135 (list-url 135 (list-url
136 "http://webmail.netscape.com/tpl/Mail/%s/List?FolderID=-4&SortUseCase=True" 136 "http://webmail.netscape.com/tpl/Mail/%s/List?FolderID=-4&SortUseCase=True"
137 webmail-session) 137 webmail-session)
138 (list-snarf . webmail-netaddress-list) 138 (list-snarf . webmail-netaddress-list)
139 (article-url "http://webmail.netscape.com/") 139 (article-url "http://webmail.netscape.com/")
140 (article-snarf . webmail-netscape-article) 140 (article-snarf . webmail-netscape-article)
141 (trash-url 141 (trash-url
142 "http://webmail.netscape.com/tpl/Message/%s/Move?FolderID=-4&Q=%s&N=&Sort=Date&F=-1" 142 "http://webmail.netscape.com/tpl/Message/%s/Move?FolderID=-4&Q=%s&N=&Sort=Date&F=-1"
143 webmail-session id)) 143 webmail-session id))
144 (my-deja 144 (my-deja
@@ -147,7 +147,7 @@
147 (open-url "http://www.deja.com/my/pr.xp") 147 (open-url "http://www.deja.com/my/pr.xp")
148 (open-snarf . webmail-my-deja-open) 148 (open-snarf . webmail-my-deja-open)
149 (login-url 149 (login-url
150 content 150 content
151 ("%s" webmail-aux) 151 ("%s" webmail-aux)
152 "member_name=%s&pw=%s&go=&priv_opt_MyDeja99=" 152 "member_name=%s&pw=%s&go=&priv_opt_MyDeja99="
153 user password) 153 user password)
@@ -157,7 +157,7 @@
157 (trash-url webmail-aux id)))) 157 (trash-url webmail-aux id))))
158 158
159(defvar webmail-variables 159(defvar webmail-variables
160 '(address article-snarf article-url list-snarf list-url 160 '(address article-snarf article-url list-snarf list-url
161 login-url login-snarf open-url open-snarf site articles 161 login-url login-snarf open-url open-snarf site articles
162 post-process paranoid trash-url)) 162 post-process paranoid trash-url))
163 163
@@ -201,7 +201,7 @@
201(defun webmail-debug (str) 201(defun webmail-debug (str)
202 (with-temp-buffer 202 (with-temp-buffer
203 (insert "\n---------------- A bug at " str " ------------------\n") 203 (insert "\n---------------- A bug at " str " ------------------\n")
204 (mapcar #'(lambda (sym) 204 (mapcar #'(lambda (sym)
205 (if (boundp sym) 205 (if (boundp sym)
206 (pp `(setq ,sym ',(eval sym)) (current-buffer)))) 206 (pp `(setq ,sym ',(eval sym)) (current-buffer))))
207 '(webmail-type user)) 207 '(webmail-type user))
@@ -264,7 +264,7 @@
264 264
265(defun webmail-url (xurl) 265(defun webmail-url (xurl)
266 (mm-with-unibyte-current-buffer 266 (mm-with-unibyte-current-buffer
267 (cond 267 (cond
268 ((eq (car xurl) 'content) 268 ((eq (car xurl) 'content)
269 (pop xurl) 269 (pop xurl)
270 (webmail-fetch-simple (if (stringp (car xurl)) 270 (webmail-fetch-simple (if (stringp (car xurl))
@@ -300,7 +300,7 @@
300;; instead of 303, though they mean 303. 300;; instead of 303, though they mean 303.
301 301
302(defun webmail-url-confirmation-func (prompt) 302(defun webmail-url-confirmation-func (prompt)
303 (cond 303 (cond
304 ((equal prompt (concat "Honor redirection with non-GET method " 304 ((equal prompt (concat "Honor redirection with non-GET method "
305 "(possible security risks)? ")) 305 "(possible security risks)? "))
306 nil) 306 nil)
@@ -311,7 +311,7 @@
311(defun webmail-refresh-redirect () 311(defun webmail-refresh-redirect ()
312 "Redirect refresh url in META." 312 "Redirect refresh url in META."
313 (goto-char (point-min)) 313 (goto-char (point-min))
314 (while (re-search-forward 314 (while (re-search-forward
315 "<meta[ \t\r\n]*http-equiv=\"Refresh\"[^>]*URL=\\([^\"]+\\)\"" 315 "<meta[ \t\r\n]*http-equiv=\"Refresh\"[^>]*URL=\\([^\"]+\\)\""
316 nil t) 316 nil t)
317 (let ((url (match-string 1))) 317 (let ((url (match-string 1)))
@@ -341,19 +341,19 @@
341 item id (n 0)) 341 item id (n 0))
342 (webmail-init) 342 (webmail-init)
343 (setq webmail-articles nil) 343 (setq webmail-articles nil)
344 (when webmail-open-url 344 (when webmail-open-url
345 (erase-buffer) 345 (erase-buffer)
346 (webmail-url webmail-open-url)) 346 (webmail-url webmail-open-url))
347 (if webmail-open-snarf (funcall webmail-open-snarf)) 347 (if webmail-open-snarf (funcall webmail-open-snarf))
348 (when webmail-login-url 348 (when webmail-login-url
349 (erase-buffer) 349 (erase-buffer)
350 (webmail-url webmail-login-url)) 350 (webmail-url webmail-login-url))
351 (if webmail-login-snarf 351 (if webmail-login-snarf
352 (funcall webmail-login-snarf)) 352 (funcall webmail-login-snarf))
353 (when webmail-list-url 353 (when webmail-list-url
354 (erase-buffer) 354 (erase-buffer)
355 (webmail-url webmail-list-url)) 355 (webmail-url webmail-list-url))
356 (if webmail-list-snarf 356 (if webmail-list-snarf
357 (funcall webmail-list-snarf)) 357 (funcall webmail-list-snarf))
358 (while (setq item (pop webmail-articles)) 358 (while (setq item (pop webmail-articles))
359 (message "Fetching mail #%d..." (setq n (1+ n))) 359 (message "Fetching mail #%d..." (setq n (1+ n)))
@@ -361,7 +361,7 @@
361 (mm-with-unibyte-current-buffer 361 (mm-with-unibyte-current-buffer
362 (nnweb-insert (cdr item))) 362 (nnweb-insert (cdr item)))
363 (setq id (car item)) 363 (setq id (car item))
364 (if webmail-article-snarf 364 (if webmail-article-snarf
365 (funcall webmail-article-snarf file id)) 365 (funcall webmail-article-snarf file id))
366 (when (and webmail-trash-url webmail-move-to-trash-can) 366 (when (and webmail-trash-url webmail-move-to-trash-can)
367 (message "Move mail #%d to trash can..." n) 367 (message "Move mail #%d to trash can..." n)
@@ -371,7 +371,7 @@
371 (let (buf) 371 (let (buf)
372 (while (setq buf (pop webmail-buffer-list)) 372 (while (setq buf (pop webmail-buffer-list))
373 (kill-buffer buf)))) 373 (kill-buffer buf))))
374 (error 374 (error
375 (let (buf) 375 (let (buf)
376 (while (setq buf (pop webmail-buffer-list)) 376 (while (setq buf (pop webmail-buffer-list))
377 (kill-buffer buf))) 377 (kill-buffer buf)))
@@ -391,7 +391,7 @@
391 391
392(defun webmail-hotmail-open () 392(defun webmail-hotmail-open ()
393 (goto-char (point-min)) 393 (goto-char (point-min))
394 (if (re-search-forward 394 (if (re-search-forward
395 "action=\"https?://\\([^/]+\\)/cgi-bin/dologin" nil t) 395 "action=\"https?://\\([^/]+\\)/cgi-bin/dologin" nil t)
396 (setq webmail-aux (match-string 1)) 396 (setq webmail-aux (match-string 1))
397 (webmail-error "open@1"))) 397 (webmail-error "open@1")))
@@ -399,12 +399,12 @@
399(defun webmail-hotmail-login () 399(defun webmail-hotmail-login ()
400 (let (site) 400 (let (site)
401 (goto-char (point-min)) 401 (goto-char (point-min))
402 (if (re-search-forward 402 (if (re-search-forward
403 "https?://\\([^/]+hotmail\\.msn\\.com\\)/cgi-bin/" nil t) 403 "https?://\\([^/]+hotmail\\.msn\\.com\\)/cgi-bin/" nil t)
404 (setq site (match-string 1)) 404 (setq site (match-string 1))
405 (webmail-error "login@1")) 405 (webmail-error "login@1"))
406 (goto-char (point-min)) 406 (goto-char (point-min))
407 (if (re-search-forward 407 (if (re-search-forward
408 "\\(/cgi-bin/HoTMaiL\\?[^\"]*a=b[^\"]*\\)" nil t) 408 "\\(/cgi-bin/HoTMaiL\\?[^\"]*a=b[^\"]*\\)" nil t)
409 (setq webmail-aux (concat "http://" site (match-string 1))) 409 (setq webmail-aux (concat "http://" site (match-string 1)))
410 (webmail-error "login@2")))) 410 (webmail-error "login@2"))))
@@ -415,27 +415,27 @@
415 (let (site url newp (total "0")) 415 (let (site url newp (total "0"))
416 (if (eobp) 416 (if (eobp)
417 (setq total "0") 417 (setq total "0")
418 (if (re-search-forward "\\([0-9]+\\) *<b>(\\([0-9]+\\) new)" nil t) 418 (if (re-search-forward "\\([0-9]+\\) *<b>(\\([0-9]+\\) new)" nil t)
419 (message "Found %s (%s new)" (setq total (match-string 1)) 419 (message "Found %s (%s new)" (setq total (match-string 1))
420 (match-string 2)) 420 (match-string 2))
421 (if (re-search-forward "\\([0-9]+\\) new" nil t) 421 (if (re-search-forward "\\([0-9]+\\) new" nil t)
422 (message "Found %s new" (setq total (match-string 1))) 422 (message "Found %s new" (setq total (match-string 1)))
423 (webmail-error "list@0")))) 423 (webmail-error "list@0"))))
424 (unless (equal total "0") 424 (unless (equal total "0")
425 (goto-char (point-min)) 425 (goto-char (point-min))
426 (if (re-search-forward 426 (if (re-search-forward
427 "https?://\\([^/]+hotmail\\.msn\\.com\\)/cgi-bin/" nil t) 427 "https?://\\([^/]+hotmail\\.msn\\.com\\)/cgi-bin/" nil t)
428 (setq site (match-string 1)) 428 (setq site (match-string 1))
429 (webmail-error "list@1")) 429 (webmail-error "list@1"))
430 (goto-char (point-min)) 430 (goto-char (point-min))
431 (if (re-search-forward "disk=\\([^&]*\\)&" nil t) 431 (if (re-search-forward "disk=\\([^&]*\\)&" nil t)
432 (setq webmail-aux 432 (setq webmail-aux
433 (concat "http://" site "/cgi-bin/HoTMaiL?disk=" 433 (concat "http://" site "/cgi-bin/HoTMaiL?disk="
434 (match-string 1))) 434 (match-string 1)))
435 (webmail-error "list@2")) 435 (webmail-error "list@2"))
436 (goto-char (point-max)) 436 (goto-char (point-max))
437 (while (re-search-backward 437 (while (re-search-backward
438 "newmail\\.gif\\|href=\"\\(/cgi-bin/getmsg\\?[^\"]+\\)\"" 438 "newmail\\.gif\\|href=\"\\(/cgi-bin/getmsg\\?[^\"]+\\)\""
439 nil t) 439 nil t)
440 (if (setq url (match-string 1)) 440 (if (setq url (match-string 1))
441 (progn 441 (progn
@@ -443,7 +443,7 @@
443 (let (id) 443 (let (id)
444 (if (string-match "msg=\\([^&]+\\)" url) 444 (if (string-match "msg=\\([^&]+\\)" url)
445 (setq id (match-string 1 url))) 445 (setq id (match-string 1 url)))
446 (push (cons id (concat "http://" site url "&raw=0")) 446 (push (cons id (concat "http://" site url "&raw=0"))
447 webmail-articles))) 447 webmail-articles)))
448 (setq newp nil)) 448 (setq newp nil))
449 (setq newp t)))))) 449 (setq newp t))))))
@@ -453,7 +453,7 @@
453(defun webmail-hotmail-article (file id) 453(defun webmail-hotmail-article (file id)
454 (goto-char (point-min)) 454 (goto-char (point-min))
455 (skip-chars-forward " \t\n\r") 455 (skip-chars-forward " \t\n\r")
456 (unless (eobp) 456 (unless (eobp)
457 (if (not (search-forward "<pre>" nil t)) 457 (if (not (search-forward "<pre>" nil t))
458 (webmail-error "article@3")) 458 (webmail-error "article@3"))
459 (skip-chars-forward "\n\r\t ") 459 (skip-chars-forward "\n\r\t ")
@@ -489,7 +489,7 @@
489 (narrow-to-region (point-min) (point)) 489 (narrow-to-region (point-min) (point))
490 (if (not (search-backward "<table" nil t 2)) 490 (if (not (search-backward "<table" nil t 2))
491 (webmail-error "article@1.1")) 491 (webmail-error "article@1.1"))
492 (delete-region (point-min) (match-beginning 0)) 492 (delete-region (point-min) (match-beginning 0))
493 (while (search-forward "<a href=" nil t) 493 (while (search-forward "<a href=" nil t)
494 (setq p (match-beginning 0)) 494 (setq p (match-beginning 0))
495 (search-forward "</a>" nil t) 495 (search-forward "</a>" nil t)
@@ -507,8 +507,8 @@
507 (widen) 507 (widen)
508 (insert "\n") 508 (insert "\n")
509 (setq p (point)) 509 (setq p (point))
510 (while (re-search-forward 510 (while (re-search-forward
511 "<tt>\\|<div>\\|\\(http://[^/]+/cgi-bin/getmsg/\\([^\?]+\\)\?[^\"]*\\)\"" 511 "<tt>\\|<div>\\|\\(http://[^/]+/cgi-bin/getmsg/\\([^\?]+\\)\?[^\"]*\\)\""
512 nil t) 512 nil t)
513 (if (setq attachment (match-string 1)) 513 (if (setq attachment (match-string 1))
514 (let ((filename (match-string 2)) 514 (let ((filename (match-string 2))
@@ -520,7 +520,7 @@
520 (push (current-buffer) webmail-buffer-list) 520 (push (current-buffer) webmail-buffer-list)
521 (setq bufname (buffer-name))) 521 (setq bufname (buffer-name)))
522 (setq mime t) 522 (setq mime t)
523 (insert "<#part type=" 523 (insert "<#part type="
524 (or (and filename 524 (or (and filename
525 (string-match "\\.[^\\.]+$" filename) 525 (string-match "\\.[^\\.]+$" filename)
526 (mailcap-extension-to-mime 526 (mailcap-extension-to-mime
@@ -537,7 +537,7 @@
537 (webmail-error "article@1.2") 537 (webmail-error "article@1.2")
538 (delete-region (match-beginning 0) (match-end 0))) 538 (delete-region (match-beginning 0) (match-end 0)))
539 (setq count 1) 539 (setq count 1)
540 (while (and (> count 0) 540 (while (and (> count 0)
541 (re-search-forward "</div>\\|\\(<div>\\)" nil t)) 541 (re-search-forward "</div>\\|\\(<div>\\)" nil t))
542 (if (match-string 1) 542 (if (match-string 1)
543 (setq count (1+ count)) 543 (setq count (1+ count))
@@ -546,7 +546,7 @@
546 (match-end 0)))))) 546 (match-end 0))))))
547 (narrow-to-region p (point)) 547 (narrow-to-region p (point))
548 (goto-char (point-min)) 548 (goto-char (point-min))
549 (cond 549 (cond
550 ((looking-at "<pre>") 550 ((looking-at "<pre>")
551 (goto-char (match-end 0)) 551 (goto-char (match-end 0))
552 (if (looking-at "$") (forward-char)) 552 (if (looking-at "$") (forward-char))
@@ -571,7 +571,7 @@
571 "@" (symbol-name webmail-type) "\n") 571 "@" (symbol-name webmail-type) "\n")
572 (if id 572 (if id
573 (insert (format "X-Message-ID: <%s@hotmail.com>\n" id))) 573 (insert (format "X-Message-ID: <%s@hotmail.com>\n" id)))
574 (unless (looking-at "$") 574 (unless (looking-at "$")
575 (if (search-forward "\n\n" nil t) 575 (if (search-forward "\n\n" nil t)
576 (forward-line -1) 576 (forward-line -1)
577 (webmail-error "article@2"))) 577 (webmail-error "article@2")))
@@ -610,21 +610,21 @@
610(defun webmail-yahoo-list () 610(defun webmail-yahoo-list ()
611 (let (url (newp t) (tofetch 0)) 611 (let (url (newp t) (tofetch 0))
612 (goto-char (point-min)) 612 (goto-char (point-min))
613 (when (re-search-forward 613 (when (re-search-forward
614 "showing [0-9]+-\\([0-9]+\\) of \\([0-9]+\\)" nil t) 614 "showing [0-9]+-\\([0-9]+\\) of \\([0-9]+\\)" nil t)
615 ;;(setq listed (match-string 1)) 615 ;;(setq listed (match-string 1))
616 (message "Found %s mail(s)" (match-string 2))) 616 (message "Found %s mail(s)" (match-string 2)))
617 (if (string-match "http://[^/]+" webmail-aux) 617 (if (string-match "http://[^/]+" webmail-aux)
618 (setq webmail-aux (match-string 0 webmail-aux)) 618 (setq webmail-aux (match-string 0 webmail-aux))
619 (webmail-error "list@1")) 619 (webmail-error "list@1"))
620 (goto-char (point-min)) 620 (goto-char (point-min))
621 (while (re-search-forward 621 (while (re-search-forward
622 "bgcolor=\"#eeeeee\"\\|href=\"\\(/ym/ShowLetter\\?MsgId=\\([^&]+\\)&[^\"]*\\)\"" 622 "bgcolor=\"#eeeeee\"\\|href=\"\\(/ym/ShowLetter\\?MsgId=\\([^&]+\\)&[^\"]*\\)\""
623 nil t) 623 nil t)
624 (if (setq url (match-string 1)) 624 (if (setq url (match-string 1))
625 (progn 625 (progn
626 (when (or newp (not webmail-newmail-only)) 626 (when (or newp (not webmail-newmail-only))
627 (push (cons (match-string 2) (concat webmail-aux url "&toc=1")) 627 (push (cons (match-string 2) (concat webmail-aux url "&toc=1"))
628 webmail-articles) 628 webmail-articles)
629 (setq tofetch (1+ tofetch))) 629 (setq tofetch (1+ tofetch)))
630 (setq newp t)) 630 (setq newp t))
@@ -640,7 +640,7 @@
640 (webmail-error "article@1")) 640 (webmail-error "article@1"))
641 (if (not (search-forward "<table" nil t)) 641 (if (not (search-forward "<table" nil t))
642 (webmail-error "article@2")) 642 (webmail-error "article@2"))
643 (delete-region (point-min) (match-beginning 0)) 643 (delete-region (point-min) (match-beginning 0))
644 (if (not (search-forward "</table>" nil t)) 644 (if (not (search-forward "</table>" nil t))
645 (webmail-error "article@3")) 645 (webmail-error "article@3"))
646 (narrow-to-region (point-min) (match-end 0)) 646 (narrow-to-region (point-min) (match-end 0))
@@ -702,7 +702,7 @@
702 "@" (symbol-name webmail-type) "\n") 702 "@" (symbol-name webmail-type) "\n")
703 (if id 703 (if id
704 (insert (format "X-Message-ID: <%s@yahoo.com>\n" id))) 704 (insert (format "X-Message-ID: <%s@yahoo.com>\n" id)))
705 (unless (looking-at "$") 705 (unless (looking-at "$")
706 (if (search-forward "\n\n" nil t) 706 (if (search-forward "\n\n" nil t)
707 (forward-line -1) 707 (forward-line -1)
708 (webmail-error "article@2"))) 708 (webmail-error "article@2")))
@@ -724,8 +724,8 @@
724(defun webmail-netscape-open () 724(defun webmail-netscape-open ()
725 (goto-char (point-min)) 725 (goto-char (point-min))
726 (setq webmail-aux "") 726 (setq webmail-aux "")
727 (while (re-search-forward 727 (while (re-search-forward
728 "TYPE=hidden *NAME=\\([^ ]+\\) *VALUE=\"\\([^\"]+\\)" 728 "TYPE=hidden *NAME=\\([^ ]+\\) *VALUE=\"\\([^\"]+\\)"
729 nil t) 729 nil t)
730 (setq webmail-aux (concat webmail-aux "&" (match-string 1) "=" 730 (setq webmail-aux (concat webmail-aux "&" (match-string 1) "="
731 (match-string 2))))) 731 (match-string 2)))))
@@ -747,16 +747,16 @@
747 (webmail-refresh-redirect) 747 (webmail-refresh-redirect)
748 (let (item id) 748 (let (item id)
749 (goto-char (point-min)) 749 (goto-char (point-min))
750 (when (re-search-forward 750 (when (re-search-forward
751 "(\\([0-9]+\\) unread, \\([0-9]+\\) total)" nil t) 751 "(\\([0-9]+\\) unread, \\([0-9]+\\) total)" nil t)
752 (message "Found %s mail(s), %s unread" 752 (message "Found %s mail(s), %s unread"
753 (match-string 2) (match-string 1))) 753 (match-string 2) (match-string 1)))
754 (goto-char (point-min)) 754 (goto-char (point-min))
755 (while (re-search-forward 755 (while (re-search-forward
756 "MR\\[i\\]\\.R='\\([^']*\\)'\\|MR\\[i\\]\\.Q='\\([^']+\\)'" nil t) 756 "MR\\[i\\]\\.R='\\([^']*\\)'\\|MR\\[i\\]\\.Q='\\([^']+\\)'" nil t)
757 (if (setq id (match-string 2)) 757 (if (setq id (match-string 2))
758 (setq item 758 (setq item
759 (cons id 759 (cons id
760 (format "%s/tpl/Message/%s/Read?Q=%s&FolderID=-4&SortUseCase=True&Sort=Date&Headers=True" 760 (format "%s/tpl/Message/%s/Read?Q=%s&FolderID=-4&SortUseCase=True&Sort=Date&Headers=True"
761 (car webmail-article-url) 761 (car webmail-article-url)
762 webmail-session id))) 762 webmail-session id)))
@@ -767,7 +767,7 @@
767 767
768(defun webmail-netaddress-single-part () 768(defun webmail-netaddress-single-part ()
769 (goto-char (point-min)) 769 (goto-char (point-min))
770 (cond 770 (cond
771 ((looking-at "[\t\040\r\n]*<font face=[^>]+>[\t\040\r\n]*") 771 ((looking-at "[\t\040\r\n]*<font face=[^>]+>[\t\040\r\n]*")
772 ;; text/plain 772 ;; text/plain
773 (replace-match "") 773 (replace-match "")
@@ -796,7 +796,7 @@
796 (webmail-error "article@1")) 796 (webmail-error "article@1"))
797 (if (not (search-forward "<form>" nil t)) 797 (if (not (search-forward "<form>" nil t))
798 (webmail-error "article@2")) 798 (webmail-error "article@2"))
799 (delete-region (point-min) (match-beginning 0)) 799 (delete-region (point-min) (match-beginning 0))
800 (if (not (search-forward "</form>" nil t)) 800 (if (not (search-forward "</form>" nil t))
801 (webmail-error "article@3")) 801 (webmail-error "article@3"))
802 (narrow-to-region (point-min) (match-end 0)) 802 (narrow-to-region (point-min) (match-end 0))
@@ -826,7 +826,7 @@
826 (forward-line 14) 826 (forward-line 14)
827 (delete-region p (point)) 827 (delete-region p (point))
828 (goto-char (point-max)) 828 (goto-char (point-max))
829 (unless (re-search-backward 829 (unless (re-search-backward
830 "[\040\t]*<br>[\040\t\r\n]*<br>[\040\t\r\n]*<form" p t) 830 "[\040\t]*<br>[\040\t\r\n]*<br>[\040\t\r\n]*<form" p t)
831 (webmail-error "article@5")) 831 (webmail-error "article@5"))
832 (delete-region (point) (point-max)) 832 (delete-region (point) (point-max))
@@ -859,9 +859,9 @@
859 (insert "><#/part>\n") 859 (insert "><#/part>\n")
860 (setq p (point)))) 860 (setq p (point))))
861 (delete-region p p1) 861 (delete-region p p1)
862 (narrow-to-region 862 (narrow-to-region
863 p 863 p
864 (if (search-forward 864 (if (search-forward
865 "<TABLE border=\"0\" WIDTH=\"98%\" cellpadding=0 cellspacing=0>" 865 "<TABLE border=\"0\" WIDTH=\"98%\" cellpadding=0 cellspacing=0>"
866 nil t) 866 nil t)
867 (match-beginning 0) 867 (match-beginning 0)
@@ -881,7 +881,7 @@
881 "@" (symbol-name webmail-type) "\n") 881 "@" (symbol-name webmail-type) "\n")
882 (if id 882 (if id
883 (insert (format "X-Message-ID: <%s@%s>\n" id webmail-address))) 883 (insert (format "X-Message-ID: <%s@%s>\n" id webmail-address)))
884 (unless (looking-at "$") 884 (unless (looking-at "$")
885 (if (search-forward "\n\n" nil t) 885 (if (search-forward "\n\n" nil t)
886 (forward-line -1) 886 (forward-line -1)
887 (webmail-error "article@2"))) 887 (webmail-error "article@2")))
@@ -890,7 +890,7 @@
890 (goto-char (point-min)) 890 (goto-char (point-min))
891 (while (not (eobp)) 891 (while (not (eobp))
892 (if (looking-at "MIME-Version\\|Content-Type") 892 (if (looking-at "MIME-Version\\|Content-Type")
893 (delete-region (point) 893 (delete-region (point)
894 (progn 894 (progn
895 (forward-line 1) 895 (forward-line 1)
896 (if (re-search-forward "^[^ \t]" nil t) 896 (if (re-search-forward "^[^ \t]" nil t)
@@ -921,7 +921,7 @@
921 (webmail-error "article@1")) 921 (webmail-error "article@1"))
922 (if (not (search-forward "<form>" nil t)) 922 (if (not (search-forward "<form>" nil t))
923 (webmail-error "article@2")) 923 (webmail-error "article@2"))
924 (delete-region (point-min) (match-beginning 0)) 924 (delete-region (point-min) (match-beginning 0))
925 (if (not (search-forward "</form>" nil t)) 925 (if (not (search-forward "</form>" nil t))
926 (webmail-error "article@3")) 926 (webmail-error "article@3"))
927 (narrow-to-region (point-min) (match-end 0)) 927 (narrow-to-region (point-min) (match-end 0))
@@ -954,7 +954,7 @@
954 (forward-line 14) 954 (forward-line 14)
955 (delete-region p (point)) 955 (delete-region p (point))
956 (goto-char (point-max)) 956 (goto-char (point-max))
957 (unless (re-search-backward 957 (unless (re-search-backward
958 "<form name=\"Transfer2\"" p t) 958 "<form name=\"Transfer2\"" p t)
959 (webmail-error "article@5")) 959 (webmail-error "article@5"))
960 (delete-region (point) (point-max)) 960 (delete-region (point) (point-max))
@@ -987,9 +987,9 @@
987 (insert "><#/part>\n") 987 (insert "><#/part>\n")
988 (setq p (point)))) 988 (setq p (point))))
989 (delete-region p p1) 989 (delete-region p p1)
990 (narrow-to-region 990 (narrow-to-region
991 p 991 p
992 (if (search-forward 992 (if (search-forward
993 "<TABLE border=\"0\" WIDTH=\"98%\" cellpadding=0 cellspacing=0>" 993 "<TABLE border=\"0\" WIDTH=\"98%\" cellpadding=0 cellspacing=0>"
994 nil t) 994 nil t)
995 (match-beginning 0) 995 (match-beginning 0)
@@ -1009,7 +1009,7 @@
1009 "@" (symbol-name webmail-type) "\n") 1009 "@" (symbol-name webmail-type) "\n")
1010 (if id 1010 (if id
1011 (insert (format "X-Message-ID: <%s@%s>\n" id webmail-address))) 1011 (insert (format "X-Message-ID: <%s@%s>\n" id webmail-address)))
1012 (unless (looking-at "$") 1012 (unless (looking-at "$")
1013 (if (search-forward "\n\n" nil t) 1013 (if (search-forward "\n\n" nil t)
1014 (forward-line -1) 1014 (forward-line -1)
1015 (webmail-error "article@2"))) 1015 (webmail-error "article@2")))
@@ -1018,7 +1018,7 @@
1018 (goto-char (point-min)) 1018 (goto-char (point-min))
1019 (while (not (eobp)) 1019 (while (not (eobp))
1020 (if (looking-at "MIME-Version\\|Content-Type") 1020 (if (looking-at "MIME-Version\\|Content-Type")
1021 (delete-region (point) 1021 (delete-region (point)
1022 (progn 1022 (progn
1023 (forward-line 1) 1023 (forward-line 1)
1024 (if (re-search-forward "^[^ \t]" nil t) 1024 (if (re-search-forward "^[^ \t]" nil t)
@@ -1045,7 +1045,7 @@
1045(defun webmail-my-deja-open () 1045(defun webmail-my-deja-open ()
1046 (webmail-refresh-redirect) 1046 (webmail-refresh-redirect)
1047 (goto-char (point-min)) 1047 (goto-char (point-min))
1048 (if (re-search-forward "action=\"\\([^\"]+login_confirm\\.xp[^\"]*\\)\"" 1048 (if (re-search-forward "action=\"\\([^\"]+login_confirm\\.xp[^\"]*\\)\""
1049 nil t) 1049 nil t)
1050 (setq webmail-aux (match-string 1)) 1050 (setq webmail-aux (match-string 1))
1051 (webmail-error "open@1"))) 1051 (webmail-error "open@1")))
@@ -1053,26 +1053,26 @@
1053(defun webmail-my-deja-list () 1053(defun webmail-my-deja-list ()
1054 (let (item id newp base) 1054 (let (item id newp base)
1055 (goto-char (point-min)) 1055 (goto-char (point-min))
1056 (when (re-search-forward "href=\"\\(\\([^\"]*\\)/mailnf\\.[^\"]*\\)\"" 1056 (when (re-search-forward "href=\"\\(\\([^\"]*\\)/mailnf\\.[^\"]*\\)\""
1057 nil t) 1057 nil t)
1058 (let ((url (match-string 1))) 1058 (let ((url (match-string 1)))
1059 (setq base (match-string 2)) 1059 (setq base (match-string 2))
1060 (erase-buffer) 1060 (erase-buffer)
1061 (nnweb-insert url))) 1061 (nnweb-insert url)))
1062 (goto-char (point-min)) 1062 (goto-char (point-min))
1063 (when (re-search-forward 1063 (when (re-search-forward
1064 "(\\([0-9]+\\) Message.?-[^>]*\\([0-9]+\\) New" 1064 "(\\([0-9]+\\) Message.?-[^>]*\\([0-9]+\\) New"
1065 nil t) 1065 nil t)
1066 (message "Found %s mail(s), %s unread" 1066 (message "Found %s mail(s), %s unread"
1067 (match-string 1) (match-string 2))) 1067 (match-string 1) (match-string 2)))
1068 (goto-char (point-min)) 1068 (goto-char (point-min))
1069 (while (re-search-forward 1069 (while (re-search-forward
1070 "newmail\\.gif\\|href=\"[^\"]*\\(mailnf\\.[^\"]+act=view[^\"]+mid=\\([^\"&]+\\)[^\"]+\\)\"" 1070 "newmail\\.gif\\|href=\"[^\"]*\\(mailnf\\.[^\"]+act=view[^\"]+mid=\\([^\"&]+\\)[^\"]+\\)\""
1071 nil t) 1071 nil t)
1072 (if (setq id (match-string 2)) 1072 (if (setq id (match-string 2))
1073 (when (and (or newp (not webmail-newmail-only)) 1073 (when (and (or newp (not webmail-newmail-only))
1074 (not (assoc id webmail-articles))) 1074 (not (assoc id webmail-articles)))
1075 (push (cons id (setq webmail-aux 1075 (push (cons id (setq webmail-aux
1076 (concat base "/" (match-string 1)))) 1076 (concat base "/" (match-string 1))))
1077 webmail-articles) 1077 webmail-articles)
1078 (setq newp nil)) 1078 (setq newp nil))
@@ -1081,7 +1081,7 @@
1081 1081
1082(defun webmail-my-deja-article-part (base) 1082(defun webmail-my-deja-article-part (base)
1083 (let (p) 1083 (let (p)
1084 (cond 1084 (cond
1085 ((looking-at "[\t\040\r\n]*<!--[^>]*>") 1085 ((looking-at "[\t\040\r\n]*<!--[^>]*>")
1086 (replace-match "")) 1086 (replace-match ""))
1087 ((looking-at "[\t\040\r\n]*</PRE>") 1087 ((looking-at "[\t\040\r\n]*</PRE>")
@@ -1113,13 +1113,13 @@
1113 (if (and (search-forward "File Type:" nil t) 1113 (if (and (search-forward "File Type:" nil t)
1114 (re-search-forward "<FONT[^>]+>\\([^<]+\\)" nil t)) 1114 (re-search-forward "<FONT[^>]+>\\([^<]+\\)" nil t))
1115 (setq type (match-string 1))) 1115 (setq type (match-string 1)))
1116 (unless (re-search-forward "action=\"getattach\\.cgi/\\([^\"]+\\)" 1116 (unless (re-search-forward "action=\"getattach\\.cgi/\\([^\"]+\\)"
1117 nil t) 1117 nil t)
1118 (webmail-error "article@5")) 1118 (webmail-error "article@5"))
1119 (setq url (concat base "/getattach.cgi/" (match-string 1) 1119 (setq url (concat base "/getattach.cgi/" (match-string 1)
1120 "?sm=Download")) 1120 "?sm=Download"))
1121 (while (re-search-forward 1121 (while (re-search-forward
1122 "type=hidden name=\"\\([^\"]+\\)\" value=\"\\([^\"]+\\)" 1122 "type=hidden name=\"\\([^\"]+\\)\" value=\"\\([^\"]+\\)"
1123 nil t) 1123 nil t)
1124 (setq url (concat url "&" (match-string 1) "=" 1124 (setq url (concat url "&" (match-string 1) "="
1125 (match-string 2)))) 1125 (match-string 2))))
@@ -1144,7 +1144,7 @@
1144 (unless (string-match "\\([^\"]+\\)/mail" webmail-aux) 1144 (unless (string-match "\\([^\"]+\\)/mail" webmail-aux)
1145 (webmail-error "article@0")) 1145 (webmail-error "article@0"))
1146 (setq base (match-string 1 webmail-aux)) 1146 (setq base (match-string 1 webmail-aux))
1147 (when (re-search-forward 1147 (when (re-search-forward
1148 "href=\"[^\"]*\\(mailnf\\.[^\"]+act=move[^\"]+mid=\\([^\"&]+\\)[^\"]+\\)\"" 1148 "href=\"[^\"]*\\(mailnf\\.[^\"]+act=move[^\"]+mid=\\([^\"&]+\\)[^\"]+\\)\""
1149 nil t) 1149 nil t)
1150 (setq webmail-aux (concat base "/" (match-string 1))) 1150 (setq webmail-aux (concat base "/" (match-string 1)))
@@ -1175,7 +1175,7 @@
1175 (webmail-error "article@4")) 1175 (webmail-error "article@4"))
1176 (delete-region (point) (point-max)) 1176 (delete-region (point) (point-max))
1177 (goto-char (point-min)) 1177 (goto-char (point-min))
1178 (while (not (eobp)) 1178 (while (not (eobp))
1179 (webmail-my-deja-article-part base)) 1179 (webmail-my-deja-article-part base))
1180 (insert "MIME-Version: 1.0\n" 1180 (insert "MIME-Version: 1.0\n"
1181 (prog1 1181 (prog1