X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Frfc2231.el;h=0b028a08b8330e7ad81d176bc7705187b25ce3f3;hp=bb38c021cfb6c52ca4da05d5a5292b254aaec9b8;hb=79a508f1f7f8e13b242201273ffb8ce266e88b90;hpb=9a8731d6dea8021a10dec1b42f382609336a9aa9 diff --git a/lisp/rfc2231.el b/lisp/rfc2231.el index bb38c021c..0b028a08b 100644 --- a/lisp/rfc2231.el +++ b/lisp/rfc2231.el @@ -185,11 +185,19 @@ must never cause a Lisp error." in (sort parameters (lambda (e1 e2) (< (or (caddr e1) 0) (or (caddr e2) 0)))) - do (if (or (not (setq elem (assq attribute cparams))) - (and (numberp part) - (zerop part))) - (push (list attribute value encoded) cparams) - (setcar (cdr elem) (concat (cadr elem) value)))) + do (cond + ;; First part. + ((or (not (setq elem (assq attribute cparams))) + (and (numberp part) + (zerop part))) + (push (list attribute value encoded) cparams)) + ;; Repetition of a part; do nothing. + ((and elem + (null number)) + ) + ;; Concatenate continuation parts. + (t + (setcar (cdr elem) (concat (cadr elem) value))))) ;; Finally decode encoded values. (cons type (mapcar (lambda (elem) @@ -296,5 +304,4 @@ the result of this function." (provide 'rfc2231) -;; arch-tag: c3ab751d-d108-406a-b301-68882ad8cd63 ;;; rfc2231.el ends here