aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2006-02-08 04:35:58 +0000
committerMiles Bader2006-02-08 04:35:58 +0000
commitc96ec15a58817ac97db5348187e2d8695f609cb5 (patch)
tree9864086b61e3d4615b9f073ae28a9683e03f046f
parentc6b99621a2697da95326e97109f88a321fc66558 (diff)
downloademacs-c96ec15a58817ac97db5348187e2d8695f609cb5.tar.gz
emacs-c96ec15a58817ac97db5348187e2d8695f609cb5.zip
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-57
Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 18-21) - Update from CVS - Merge from emacs--devo--0
-rw-r--r--lisp/gnus/ChangeLog44
-rw-r--r--lisp/gnus/gnus-art.el75
-rw-r--r--lisp/gnus/mm-decode.el19
-rw-r--r--lisp/gnus/mml.el33
-rw-r--r--lisp/gnus/rfc1843.el3
-rw-r--r--lisp/gnus/rfc2231.el171
-rw-r--r--lisp/gnus/spam-report.el6
-rw-r--r--lisp/gnus/webmail.el2
8 files changed, 208 insertions, 145 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 620e017b38e..168280e8e24 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,47 @@
12006-02-07 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-art.el (article-decode-charset): Don't use ignore-errors
4 when calling mail-header-parse-content-type.
5 (article-de-quoted-unreadable): Ditto.
6 (article-de-base64-unreadable): Ditto.
7 (article-wash-html): Ditto.
8
9 * mm-decode.el (mm-dissect-buffer): Don't use ignore-errors when
10 calling mail-header-parse-content-type and
11 mail-header-parse-content-disposition.
12 (mm-find-raw-part-by-type): Don't use ignore-errors when calling
13 mail-header-parse-content-type.
14
15 * mml.el (mml-insert-mime-headers): Use mml-insert-parameter to
16 insert charset and format parameters; encode description after
17 inserting it to buffer.
18 (mml-insert-parameter): Fold lines properly even if a parameter is
19 segmented into two or more lines; change the max column to 76.
20
21 * rfc1843.el (rfc1843-decode-article-body): Don't use
22 ignore-errors when calling mail-header-parse-content-type.
23
24 * rfc2231.el (rfc2231-parse-string): Return at least type if
25 possible; don't cause an error even if it fails in parsing of
26 parameters. Suggested by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
27 (rfc2231-encode-string): Don't break lines at the beginning, leave
28 it to mml-insert-parameter.
29
30 * webmail.el (webmail-yahoo-article): Don't use ignore-errors when
31 calling mail-header-parse-content-type.
32
332006-02-06 Reiner Steib <Reiner.Steib@gmx.de>
34
35 * spam-report.el (spam-report-gmane-use-article-number): Improve
36 doc string.
37 (spam-report-gmane-internal): Check if a suitable header was found
38 in the article.
39
402006-02-04 Katsumi Yamaoka <yamaoka@jpl.org>
41
42 * rfc2231.el (rfc2231-parse-string): Revert 2006-02-03 change.
43 (rfc2231-encode-string): Make param*=value always begin with LWSP.
44
12006-02-05 Romain Francoise <romain@orebokech.com> 452006-02-05 Romain Francoise <romain@orebokech.com>
2 46
3 Update copyright notices of all files in the gnus directory. 47 Update copyright notices of all files in the gnus directory.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index b51ceff29a9..c15151729a0 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -2267,38 +2267,37 @@ If PROMPT (the prefix), prompt for a coding system to use."
2267 (error)) 2267 (error))
2268 gnus-newsgroup-ignored-charsets)) 2268 gnus-newsgroup-ignored-charsets))
2269 ct cte ctl charset format) 2269 ct cte ctl charset format)
2270 (save-excursion 2270 (save-excursion
2271 (save-restriction 2271 (save-restriction
2272 (article-narrow-to-head) 2272 (article-narrow-to-head)
2273 (setq ct (message-fetch-field "Content-Type" t) 2273 (setq ct (message-fetch-field "Content-Type" t)
2274 cte (message-fetch-field "Content-Transfer-Encoding" t) 2274 cte (message-fetch-field "Content-Transfer-Encoding" t)
2275 ctl (and ct (ignore-errors 2275 ctl (and ct (mail-header-parse-content-type ct))
2276 (mail-header-parse-content-type ct))) 2276 charset (cond
2277 charset (cond 2277 (prompt
2278 (prompt 2278 (mm-read-coding-system "Charset to decode: "))
2279 (mm-read-coding-system "Charset to decode: ")) 2279 (ctl
2280 (ctl 2280 (mail-content-type-get ctl 'charset)))
2281 (mail-content-type-get ctl 'charset))) 2281 format (and ctl (mail-content-type-get ctl 'format)))
2282 format (and ctl (mail-content-type-get ctl 'format))) 2282 (when cte
2283 (when cte 2283 (setq cte (mail-header-strip cte)))
2284 (setq cte (mail-header-strip cte))) 2284 (if (and ctl (not (string-match "/" (car ctl))))
2285 (if (and ctl (not (string-match "/" (car ctl)))) 2285 (setq ctl nil))
2286 (setq ctl nil)) 2286 (goto-char (point-max)))
2287 (goto-char (point-max))) 2287 (forward-line 1)
2288 (forward-line 1) 2288 (save-restriction
2289 (save-restriction 2289 (narrow-to-region (point) (point-max))
2290 (narrow-to-region (point) (point-max)) 2290 (when (and (eq mail-parse-charset 'gnus-decoded)
2291 (when (and (eq mail-parse-charset 'gnus-decoded) 2291 (eq (mm-body-7-or-8) '8bit))
2292 (eq (mm-body-7-or-8) '8bit)) 2292 ;; The text code could have been decoded.
2293 ;; The text code could have been decoded. 2293 (setq charset mail-parse-charset))
2294 (setq charset mail-parse-charset)) 2294 (when (and (or (not ctl)
2295 (when (and (or (not ctl) 2295 (equal (car ctl) "text/plain"))
2296 (equal (car ctl) "text/plain")) 2296 (not format)) ;; article with format will decode later.
2297 (not format)) ;; article with format will decode later. 2297 (mm-decode-body
2298 (mm-decode-body 2298 charset (and cte (intern (downcase
2299 charset (and cte (intern (downcase 2299 (gnus-strip-whitespace cte))))
2300 (gnus-strip-whitespace cte)))) 2300 (car ctl)))))))
2301 (car ctl)))))))
2302 2301
2303(defun article-decode-encoded-words () 2302(defun article-decode-encoded-words ()
2304 "Remove encoded-word encoding from headers." 2303 "Remove encoded-word encoding from headers."
@@ -2390,9 +2389,7 @@ If READ-CHARSET, ask for a coding system."
2390 (setq type 2389 (setq type
2391 (gnus-fetch-field "content-transfer-encoding")) 2390 (gnus-fetch-field "content-transfer-encoding"))
2392 (let* ((ct (gnus-fetch-field "content-type")) 2391 (let* ((ct (gnus-fetch-field "content-type"))
2393 (ctl (and ct 2392 (ctl (and ct (mail-header-parse-content-type ct))))
2394 (ignore-errors
2395 (mail-header-parse-content-type ct)))))
2396 (setq charset (and ctl 2393 (setq charset (and ctl
2397 (mail-content-type-get ctl 'charset))) 2394 (mail-content-type-get ctl 'charset)))
2398 (if (stringp charset) 2395 (if (stringp charset)
@@ -2420,9 +2417,7 @@ If READ-CHARSET, ask for a coding system."
2420 (setq type 2417 (setq type
2421 (gnus-fetch-field "content-transfer-encoding")) 2418 (gnus-fetch-field "content-transfer-encoding"))
2422 (let* ((ct (gnus-fetch-field "content-type")) 2419 (let* ((ct (gnus-fetch-field "content-type"))
2423 (ctl (and ct 2420 (ctl (and ct (mail-header-parse-content-type ct))))
2424 (ignore-errors
2425 (mail-header-parse-content-type ct)))))
2426 (setq charset (and ctl 2421 (setq charset (and ctl
2427 (mail-content-type-get ctl 'charset))) 2422 (mail-content-type-get ctl 'charset)))
2428 (if (stringp charset) 2423 (if (stringp charset)
@@ -2488,9 +2483,7 @@ charset defined in `gnus-summary-show-article-charset-alist' is used."
2488 (when (gnus-buffer-live-p gnus-original-article-buffer) 2483 (when (gnus-buffer-live-p gnus-original-article-buffer)
2489 (with-current-buffer gnus-original-article-buffer 2484 (with-current-buffer gnus-original-article-buffer
2490 (let* ((ct (gnus-fetch-field "content-type")) 2485 (let* ((ct (gnus-fetch-field "content-type"))
2491 (ctl (and ct 2486 (ctl (and ct (mail-header-parse-content-type ct))))
2492 (ignore-errors
2493 (mail-header-parse-content-type ct)))))
2494 (setq charset (and ctl 2487 (setq charset (and ctl
2495 (mail-content-type-get ctl 'charset))) 2488 (mail-content-type-get ctl 'charset)))
2496 (when (stringp charset) 2489 (when (stringp charset)
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index b275807c051..996c934191c 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -534,13 +534,13 @@ Postpone undisplaying of viewers for types in
534 loose-mime 534 loose-mime
535 (mail-fetch-field "mime-version")) 535 (mail-fetch-field "mime-version"))
536 (setq ct (mail-fetch-field "content-type") 536 (setq ct (mail-fetch-field "content-type")
537 ctl (ignore-errors (mail-header-parse-content-type ct)) 537 ctl (and ct (mail-header-parse-content-type ct))
538 cte (mail-fetch-field "content-transfer-encoding") 538 cte (mail-fetch-field "content-transfer-encoding")
539 cd (mail-fetch-field "content-disposition") 539 cd (mail-fetch-field "content-disposition")
540 description (mail-fetch-field "content-description") 540 description (mail-fetch-field "content-description")
541 id (mail-fetch-field "content-id")) 541 id (mail-fetch-field "content-id"))
542 (unless from 542 (unless from
543 (setq from (mail-fetch-field "from"))) 543 (setq from (mail-fetch-field "from")))
544 ;; FIXME: In some circumstances, this code is running within 544 ;; FIXME: In some circumstances, this code is running within
545 ;; an unibyte macro. mail-extract-address-components 545 ;; an unibyte macro. mail-extract-address-components
546 ;; creates unibyte buffers. This `if', though not a perfect 546 ;; creates unibyte buffers. This `if', though not a perfect
@@ -557,7 +557,7 @@ Postpone undisplaying of viewers for types in
557 (mail-header-remove-comments 557 (mail-header-remove-comments
558 cte))))) 558 cte)))))
559 no-strict-mime 559 no-strict-mime
560 (and cd (ignore-errors (mail-header-parse-content-disposition cd))) 560 (and cd (mail-header-parse-content-disposition cd))
561 description) 561 description)
562 (setq type (split-string (car ctl) "/")) 562 (setq type (split-string (car ctl) "/"))
563 (setq subtype (cadr type) 563 (setq subtype (cadr type)
@@ -592,8 +592,7 @@ Postpone undisplaying of viewers for types in
592 (mail-header-remove-comments 592 (mail-header-remove-comments
593 cte))))) 593 cte)))))
594 no-strict-mime 594 no-strict-mime
595 (and cd (ignore-errors 595 (and cd (mail-header-parse-content-disposition cd))
596 (mail-header-parse-content-disposition cd)))
597 description id) 596 description id)
598 ctl)))) 597 ctl))))
599 (when id 598 (when id
@@ -1401,9 +1400,8 @@ If RECURSIVE, search recursively."
1401 (save-excursion 1400 (save-excursion
1402 (save-restriction 1401 (save-restriction
1403 (narrow-to-region start (1- (point))) 1402 (narrow-to-region start (1- (point)))
1404 (when (let ((ctl (ignore-errors 1403 (when (let* ((ct (mail-fetch-field "content-type"))
1405 (mail-header-parse-content-type 1404 (ctl (and ct (mail-header-parse-content-type ct))))
1406 (mail-fetch-field "content-type")))))
1407 (if notp 1405 (if notp
1408 (not (equal (car ctl) type)) 1406 (not (equal (car ctl) type))
1409 (equal (car ctl) type))) 1407 (equal (car ctl) type)))
@@ -1414,9 +1412,8 @@ If RECURSIVE, search recursively."
1414 (save-excursion 1412 (save-excursion
1415 (save-restriction 1413 (save-restriction
1416 (narrow-to-region start end) 1414 (narrow-to-region start end)
1417 (when (let ((ctl (ignore-errors 1415 (when (let* ((ct (mail-fetch-field "content-type"))
1418 (mail-header-parse-content-type 1416 (ctl (and ct (mail-header-parse-content-type ct))))
1419 (mail-fetch-field "content-type")))))
1420 (if notp 1417 (if notp
1421 (not (equal (car ctl) type)) 1418 (not (equal (car ctl) type))
1422 (equal (car ctl) type))) 1419 (equal (car ctl) type)))
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index f8c34b370d6..0ceda113f49 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -664,10 +664,10 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
664 "Can't encode a part with several charsets")) 664 "Can't encode a part with several charsets"))
665 (insert "Content-Type: " type) 665 (insert "Content-Type: " type)
666 (when charset 666 (when charset
667 (insert "; " (mail-header-encode-parameter 667 (mml-insert-parameter
668 "charset" (symbol-name charset)))) 668 (mail-header-encode-parameter "charset" (symbol-name charset))))
669 (when flowed 669 (when flowed
670 (insert "; format=flowed")) 670 (mml-insert-parameter "format=flowed"))
671 (when parameters 671 (when parameters
672 (mml-insert-parameter-string 672 (mml-insert-parameter-string
673 cont mml-content-type-parameters)) 673 cont mml-content-type-parameters))
@@ -687,8 +687,11 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
687 (unless (eq encoding '7bit) 687 (unless (eq encoding '7bit)
688 (insert (format "Content-Transfer-Encoding: %s\n" encoding))) 688 (insert (format "Content-Transfer-Encoding: %s\n" encoding)))
689 (when (setq description (cdr (assq 'description cont))) 689 (when (setq description (cdr (assq 'description cont)))
690 (insert "Content-Description: " 690 (insert "Content-Description: ")
691 (mail-encode-encoded-word-string description) "\n")))) 691 (setq description (prog1
692 (point)
693 (insert description "\n")))
694 (mail-encode-encoded-word-region description (point)))))
692 695
693(defun mml-parameter-string (cont types) 696(defun mml-parameter-string (cont types)
694 (let ((string "") 697 (let ((string "")
@@ -841,14 +844,20 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
841 844
842(defun mml-insert-parameter (&rest parameters) 845(defun mml-insert-parameter (&rest parameters)
843 "Insert PARAMETERS in a nice way." 846 "Insert PARAMETERS in a nice way."
844 (dolist (param parameters) 847 (let (start end)
845 (insert ";") 848 (dolist (param parameters)
846 (let ((point (point))) 849 (insert ";")
850 (setq start (point))
847 (insert " " param) 851 (insert " " param)
848 (when (> (current-column) 71) 852 (setq end (point))
849 (goto-char point) 853 (goto-char start)
850 (insert "\n ") 854 (end-of-line)
851 (end-of-line))))) 855 (if (> (current-column) 76)
856 (progn
857 (goto-char start)
858 (insert "\n")
859 (goto-char (1+ end)))
860 (goto-char end)))))
852 861
853;;; 862;;;
854;;; Mode for inserting and editing MML forms 863;;; Mode for inserting and editing MML forms
diff --git a/lisp/gnus/rfc1843.el b/lisp/gnus/rfc1843.el
index 8de64ce7c99..aac75758c05 100644
--- a/lisp/gnus/rfc1843.el
+++ b/lisp/gnus/rfc1843.el
@@ -149,8 +149,7 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc"
149 (let* ((inhibit-point-motion-hooks t) 149 (let* ((inhibit-point-motion-hooks t)
150 (case-fold-search t) 150 (case-fold-search t)
151 (ct (message-fetch-field "Content-Type" t)) 151 (ct (message-fetch-field "Content-Type" t))
152 (ctl (and ct (ignore-errors 152 (ctl (and ct (mail-header-parse-content-type ct))))
153 (mail-header-parse-content-type ct)))))
154 (if (and ctl (not (string-match "/" (car ctl)))) 153 (if (and ctl (not (string-match "/" (car ctl))))
155 (setq ctl nil)) 154 (setq ctl nil))
156 (goto-char (point-max)) 155 (goto-char (point-max))
diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el
index fb2d070328e..31c9f1ade94 100644
--- a/lisp/gnus/rfc2231.el
+++ b/lisp/gnus/rfc2231.el
@@ -41,10 +41,13 @@
41N.B. This is in violation with RFC2047, but it seem to be in common use." 41N.B. This is in violation with RFC2047, but it seem to be in common use."
42 (rfc2231-parse-string (rfc2047-decode-string string))) 42 (rfc2231-parse-string (rfc2047-decode-string string)))
43 43
44(defun rfc2231-parse-string (string) 44(defun rfc2231-parse-string (string &optional signal-error)
45 "Parse STRING and return a list. 45 "Parse STRING and return a list.
46The list will be on the form 46The list will be on the form
47 `(name (attribute . value) (attribute . value)...)" 47 `(name (attribute . value) (attribute . value)...)'.
48
49If the optional SIGNAL-ERROR is non-nil, signal an error when this
50function fails in parsing of parameters."
48 (with-temp-buffer 51 (with-temp-buffer
49 (let ((ttoken (ietf-drums-token-to-list ietf-drums-text-token)) 52 (let ((ttoken (ietf-drums-token-to-list ietf-drums-text-token))
50 (stoken (ietf-drums-token-to-list ietf-drums-tspecials)) 53 (stoken (ietf-drums-token-to-list ietf-drums-tspecials))
@@ -74,63 +77,68 @@ The list will be on the form
74 (setq type (downcase (buffer-substring 77 (setq type (downcase (buffer-substring
75 (point) (progn (forward-sexp 1) (point))))) 78 (point) (progn (forward-sexp 1) (point)))))
76 ;; Do the params 79 ;; Do the params
77 (while (not (eobp)) 80 (condition-case err
78 (setq c (char-after)) 81 (progn
79 (unless (eq c ?\;) 82 (while (not (eobp))
80 (error "Invalid header: %s" string))
81 (forward-char 1)
82 ;; If c in nil, then this is an invalid header, but
83 ;; since elm generates invalid headers on this form,
84 ;; we allow it.
85 (when (setq c (char-after))
86 (if (and (memq c ttoken)
87 (not (memq c stoken)))
88 (setq attribute
89 (intern
90 (downcase
91 (buffer-substring
92 (point) (progn (forward-sexp 1) (point))))))
93 (error "Invalid header: %s" string))
94 (setq c (char-after))
95 (when (eq c ?*)
96 (forward-char 1)
97 (setq c (char-after))
98 (if (not (memq c ntoken))
99 (setq encoded t
100 number nil)
101 (setq number
102 (string-to-number
103 (buffer-substring
104 (point) (progn (forward-sexp 1) (point)))))
105 (setq c (char-after)) 83 (setq c (char-after))
106 (when (eq c ?*) 84 (unless (eq c ?\;)
107 (setq encoded t) 85 (error "Invalid header: %s" string))
86 (forward-char 1)
87 ;; If c in nil, then this is an invalid header, but
88 ;; since elm generates invalid headers on this form,
89 ;; we allow it.
90 (when (setq c (char-after))
91 (if (and (memq c ttoken)
92 (not (memq c stoken)))
93 (setq attribute
94 (intern
95 (downcase
96 (buffer-substring
97 (point) (progn (forward-sexp 1) (point))))))
98 (error "Invalid header: %s" string))
99 (setq c (char-after))
100 (when (eq c ?*)
101 (forward-char 1)
102 (setq c (char-after))
103 (if (not (memq c ntoken))
104 (setq encoded t
105 number nil)
106 (setq number
107 (string-to-number
108 (buffer-substring
109 (point) (progn (forward-sexp 1) (point)))))
110 (setq c (char-after))
111 (when (eq c ?*)
112 (setq encoded t)
113 (forward-char 1)
114 (setq c (char-after)))))
115 ;; See if we have any previous continuations.
116 (when (and prev-attribute
117 (not (eq prev-attribute attribute)))
118 (push (cons prev-attribute
119 (if prev-encoded
120 (rfc2231-decode-encoded-string prev-value)
121 prev-value))
122 parameters)
123 (setq prev-attribute nil
124 prev-value ""
125 prev-encoded nil))
126 (unless (eq c ?=)
127 (error "Invalid header: %s" string))
108 (forward-char 1) 128 (forward-char 1)
109 (setq c (char-after))))) 129 (setq c (char-after))
110 ;; See if we have any previous continuations. 130 (cond
111 (when (and prev-attribute 131 ((eq c ?\")
112 (not (eq prev-attribute attribute))) 132 (setq value (buffer-substring (1+ (point))
113 (push (cons prev-attribute 133 (progn
114 (if prev-encoded 134 (forward-sexp 1)
115 (rfc2231-decode-encoded-string prev-value) 135 (1- (point))))))
116 prev-value)) 136 ((and (or (memq c ttoken)
117 parameters) 137 ;; EXTENSION: Support non-ascii chars.
118 (setq prev-attribute nil 138 (> c ?\177))
119 prev-value "" 139 (not (memq c stoken)))
120 prev-encoded nil)) 140 (setq value
121 (unless (eq c ?=) 141 (buffer-substring
122 (error "Invalid header: %s" string))
123 (forward-char 1)
124 (setq c (char-after))
125 (cond
126 ((eq c ?\")
127 (setq value
128 (buffer-substring (1+ (point))
129 (progn (forward-sexp 1) (1- (point))))))
130 ((and (or (memq c ttoken)
131 (> c ?\177)) ;; EXTENSION: Support non-ascii chars.
132 (not (memq c stoken)))
133 (setq value (buffer-substring
134 (point) 142 (point)
135 (progn 143 (progn
136 (forward-sexp) 144 (forward-sexp)
@@ -142,25 +150,31 @@ The list will be on the form
142 (forward-char 1) 150 (forward-char 1)
143 (forward-sexp)) 151 (forward-sexp))
144 (point))))) 152 (point)))))
145 (t 153 (t
146 (error "Invalid header: %s" string))) 154 (error "Invalid header: %s" string)))
147 (if number 155 (if number
148 (setq prev-attribute attribute 156 (setq prev-attribute attribute
149 prev-value (concat prev-value value) 157 prev-value (concat prev-value value)
150 prev-encoded encoded) 158 prev-encoded encoded)
151 (push (cons attribute 159 (push (cons attribute
152 (if encoded 160 (if encoded
153 (rfc2231-decode-encoded-string value) 161 (rfc2231-decode-encoded-string value)
154 value)) 162 value))
155 parameters)))) 163 parameters))))
156 164
157 ;; Take care of any final continuations. 165 ;; Take care of any final continuations.
158 (when prev-attribute 166 (when prev-attribute
159 (push (cons prev-attribute 167 (push (cons prev-attribute
160 (if prev-encoded 168 (if prev-encoded
161 (rfc2231-decode-encoded-string prev-value) 169 (rfc2231-decode-encoded-string prev-value)
162 prev-value)) 170 prev-value))
163 parameters)) 171 parameters)))
172 (error
173 (setq parameters nil)
174 (if signal-error
175 (signal (car err) (cdr err))
176 ;;(message "%s" (error-message-string err))
177 )))
164 178
165 (when type 179 (when type
166 `(,type ,@(nreverse parameters))))))) 180 `(,type ,@(nreverse parameters)))))))
@@ -189,12 +203,15 @@ These look like \"us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A\"."
189 (buffer-string)))) 203 (buffer-string))))
190 204
191(defun rfc2231-encode-string (param value) 205(defun rfc2231-encode-string (param value)
192 "Return and PARAM=VALUE string encoded according to RFC2231." 206 "Return and PARAM=VALUE string encoded according to RFC2231.
207Use `mml-insert-parameter' or `mml-insert-parameter-string' to insert
208the result of this function."
193 (let ((control (ietf-drums-token-to-list ietf-drums-no-ws-ctl-token)) 209 (let ((control (ietf-drums-token-to-list ietf-drums-no-ws-ctl-token))
194 (tspecial (ietf-drums-token-to-list ietf-drums-tspecials)) 210 (tspecial (ietf-drums-token-to-list ietf-drums-tspecials))
195 (special (ietf-drums-token-to-list "*'%\n\t")) 211 (special (ietf-drums-token-to-list "*'%\n\t"))
196 (ascii (ietf-drums-token-to-list ietf-drums-text-token)) 212 (ascii (ietf-drums-token-to-list ietf-drums-text-token))
197 (num -1) 213 (num -1)
214 ;; Don't make lines exceeding 76 column.
198 (limit (- 74 (length param))) 215 (limit (- 74 (length param)))
199 spacep encodep charsetp charset broken) 216 spacep encodep charsetp charset broken)
200 (with-temp-buffer 217 (with-temp-buffer
@@ -241,7 +258,7 @@ These look like \"us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A\"."
241 (if (not broken) 258 (if (not broken)
242 (insert param "*=") 259 (insert param "*=")
243 (while (not (eobp)) 260 (while (not (eobp))
244 (insert (if (>= num 0) " " "\n ") 261 (insert (if (>= num 0) " " "")
245 param "*" (format "%d" (incf num)) "*=") 262 param "*" (format "%d" (incf num)) "*=")
246 (forward-line 1)))) 263 (forward-line 1))))
247 (spacep 264 (spacep
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index 04ef6b60f5f..a5f46bb79f4 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -50,7 +50,11 @@ instead."
50 :group 'spam-report) 50 :group 'spam-report)
51 51
52(defcustom spam-report-gmane-use-article-number t 52(defcustom spam-report-gmane-use-article-number t
53 "Whether the article number (faster!) or the header should be used." 53 "Whether the article number (faster!) or the header should be used.
54
55You must set this to nil if you don't read Gmane groups directly
56from news.gmane.org, e.g. when using local newsserver such as
57leafnode."
54 :type 'boolean 58 :type 'boolean
55 :group 'spam-report) 59 :group 'spam-report)
56 60
diff --git a/lisp/gnus/webmail.el b/lisp/gnus/webmail.el
index a7e53702fef..304a206a97f 100644
--- a/lisp/gnus/webmail.el
+++ b/lisp/gnus/webmail.el
@@ -637,7 +637,7 @@
637 (goto-char (point-min)) 637 (goto-char (point-min))
638 (delete-blank-lines) 638 (delete-blank-lines)
639 (setq ct (mail-fetch-field "content-type") 639 (setq ct (mail-fetch-field "content-type")
640 ctl (ignore-errors (mail-header-parse-content-type ct)) 640 ctl (and ct (mail-header-parse-content-type ct))
641 ;;cte (mail-fetch-field "content-transfer-encoding") 641 ;;cte (mail-fetch-field "content-transfer-encoding")
642 cd (mail-fetch-field "content-disposition") 642 cd (mail-fetch-field "content-disposition")
643 description (mail-fetch-field "content-description") 643 description (mail-fetch-field "content-description")