From: keiichi Date: Fri, 5 Nov 1999 06:12:29 +0000 (+0000) Subject: (mime-token-exclude-chars-regexp): New constant. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=daafb94b42af77beec850a594ff22bf217fca8dd;p=elisp%2Fflim.git (mime-token-exclude-chars-regexp): New constant. (mime-token-regexp): Use `mime-token-exclude-chars-regexp'. (mime-charset-regexp): Ditto. (Exclude `*') (mime-parameter-value): When language is not specified, do not add text-property `mime-language'. --- diff --git a/mime-def.el b/mime-def.el index 00c52fa..eec2772 100644 --- a/mime-def.el +++ b/mime-def.el @@ -105,10 +105,18 @@ (eval-and-compile (defconst mime-tspecial-char-list '(?\] ?\[ ?\( ?\) ?< ?> ?@ ?, ?\; ?: ?\\ ?\" ?/ ?? ?=))) + +(defconst mime-token-exclude-chars-regexp + (eval-when-compile + (concat mime-tspecial-char-list "\000-\040"))) + (defconst mime-token-regexp (eval-when-compile - (concat "[^" mime-tspecial-char-list "\000-\040]+"))) -(defconst mime-charset-regexp mime-token-regexp) + (concat "[^" mime-token-exclude-chars-regexp "]+"))) + +(defconst mime-charset-regexp + (eval-when-compile + (concat "[^" mime-token-exclude-chars-regexp "*]+"))) (defconst mime-media-type/subtype-regexp (concat mime-token-regexp "/" mime-token-regexp)) @@ -216,9 +224,11 @@ (decode-mime-charset-region (point-min) (point-max) mcs) (buffer-string))) - (mapconcat #'cddr sorted-raw "")))) - (put-text-property 0 (length val) - 'mime-language (mime-parameter-language parm) val) + (mapconcat #'cddr sorted-raw ""))) + (language (mime-parameter-language parm))) + (when language + (put-text-property 0 (length val) + 'mime-language val)) (aset (cdr parm) 3 val) ))))