From: shuhei Date: Thu, 19 Apr 2001 13:29:20 +0000 (+0000) Subject: (mime-decode-parameter-plist): Shortcut for parameters without extensions. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4bc993dfaaca9103dfb921a17201822563b0728a;p=elisp%2Fflim.git (mime-decode-parameter-plist): Shortcut for parameters without extensions. --- diff --git a/mime-parse.el b/mime-parse.el index c60c9b7..bc2d9c2 100644 --- a/mime-parse.el +++ b/mime-parse.el @@ -204,11 +204,12 @@ property of the decoded-value." (let ((len (/ (length params) 2)) dest eparams) (while params - (if (string-match (eval-when-compile - (concat "^\\(" mime-attribute-char-regexp "+\\)" - "\\(\\*\\([0-9]+\\)\\)?" ; continuation - "\\(\\*\\)?$")) ; charset/language - (car params)) + (if (and (string-match (eval-when-compile + (concat "^\\(" mime-attribute-char-regexp "+\\)" + "\\(\\*\\([0-9]+\\)\\)?" ; continuation + "\\(\\*\\)?$")) ; charset/language info + (car params)) + (> (match-end 0) (match-end 1))) (let* ((attribute (downcase (substring (car params) 0 (match-end 1)))) (section (if (match-beginning 2) @@ -277,7 +278,7 @@ property of the decoded-value." (aset (nth 3 eparam) section (mime-decode-parameter-encode-segment (car params))))) - ;; invalid attribute-name. + ;; no parameter value extensions used, or invalid attribute-name. (setq dest (cons (cons (downcase (car params)) (car (cdr params))) dest)