From daafb94b42af77beec850a594ff22bf217fca8dd Mon Sep 17 00:00:00 2001 From: keiichi Date: Fri, 5 Nov 1999 06:12:29 +0000 Subject: [PATCH] (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'. --- mime-def.el | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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) )))) -- 1.7.10.4