From: akr Date: Sat, 25 Apr 1998 07:29:29 +0000 (+0000) Subject: * eword-decode.el (eword-decode-first-encoded-words): Update DOC-string. X-Git-Tag: flam-1_1_0~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e7f84c58d5a26195f7308b23e01124042d75746;p=elisp%2Fflim.git * eword-decode.el (eword-decode-first-encoded-words): Update DOC-string. (eword-decode-first-encoded-words): Update DOC-string. (eword-decode-unstructured): Argument `code-conversion' is now required. (eword-decode-comment): Argument `code-conversion' is now required. (eword-decode-quoted-string): Argument `code-conversion' is now required. (eword-decode-string): Update DOC-string. Reorder arguments to calling `eword-decode-unstructured'. (eword-decode-region): Update DOC-string. Reorder arguments to calling `eword-decode-unstructured'. (eword-analyze-quoted-string): Add `default-mime-charset' argument to calling eword-decode-quoted-string. (eword-analyze-comment): Add `default-mime-charset' argument to calling eword-decode-comment. --- diff --git a/ChangeLog b/ChangeLog index a47aaf0..9854d5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,21 @@ -1998-04-25 Tanaka Akira +1998-04-25 Tanaka Akira + + * eword-decode.el (eword-decode-first-encoded-words): Update DOC-string. + (eword-decode-first-encoded-words): Update DOC-string. + (eword-decode-unstructured): Argument `code-conversion' is now required. + (eword-decode-comment): Argument `code-conversion' is now required. + (eword-decode-quoted-string): Argument `code-conversion' is now + required. + (eword-decode-string): Update DOC-string. Reorder arguments to calling + `eword-decode-unstructured'. + (eword-decode-region): Update DOC-string. Reorder arguments to calling + `eword-decode-unstructured'. + (eword-analyze-quoted-string): Add `default-mime-charset' argument to + calling eword-decode-quoted-string. + (eword-analyze-comment): Add `default-mime-charset' argument to + calling eword-decode-comment. + +1998-04-25 Tanaka Akira * eword-decode.el (eword-decode-entire-string): Delete argument `default-charset'. Add argument `code-conversion'. diff --git a/eword-decode.el b/eword-decode.el index b84861c..4f11e6b 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -163,7 +163,7 @@ eword-after-encoded-text-in-phrase-regexp, eword-after-encoded-word-in-comment-regexp or eword-after-encoded-word-in-quoted-string-regexp. -If beginning of STRING matches EWORD-REGEXP and AFTER-REGEXP, +If beginning of STRING matches EWORD-REGEXP with AFTER-REGEXP, returns a cons cell of decoded string(sequence of characters) and the rest(sequence of octets). @@ -283,7 +283,7 @@ such as a version of Net$cape)." ;;; @ for string ;;; -(defun eword-decode-unstructured (string &optional must-unfold code-conversion) +(defun eword-decode-unstructured (string code-conversion &optional must-unfold) (eword-decode-entire-string string eword-encoded-word-in-unstructured-regexp @@ -294,7 +294,7 @@ such as a version of Net$cape)." must-unfold code-conversion)) -(defun eword-decode-comment (string &optional must-unfold code-conversion) +(defun eword-decode-comment (string code-conversion &optional must-unfold) (eword-decode-entire-string string eword-encoded-word-in-comment-regexp @@ -305,7 +305,7 @@ such as a version of Net$cape)." must-unfold code-conversion)) -(defun eword-decode-quoted-string (string &optional must-unfold code-conversion) +(defun eword-decode-quoted-string (string code-conversion &optional must-unfold) (eword-decode-entire-string string eword-encoded-word-in-quoted-string-regexp @@ -326,11 +326,16 @@ decode the charset included in it, it is not decoded. If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even if there are in decoded encoded-words (generated by bad manner MUA -such as a version of Net$cape)." +such as a version of Net$cape). + +If CODE-CONVERSION is nil, it decodes only encoded-words. If it is +mime-charset, it decodes non-ASCII bit patterns as the mime-charset. +Otherwise it decodes non-ASCII bit patterns as the +default-mime-charset." (eword-decode-unstructured + code-conversion (std11-unfold-string string) - must-unfold - code-conversion)) + must-unfold)) ;;; @ for region @@ -344,7 +349,12 @@ If UNFOLDING is not nil, it unfolds before decoding. If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even if there are in decoded encoded-words (generated by bad manner MUA -such as a version of Net$cape)." +such as a version of Net$cape). + +If CODE-CONVERSION is nil, it decodes only encoded-words. If it is +mime-charset, it decodes non-ASCII bit patterns as the mime-charset. +Otherwise it decodes non-ASCII bit patterns as the +default-mime-charset." (interactive "*r") (save-excursion (save-restriction @@ -353,9 +363,9 @@ such as a version of Net$cape)." (eword-decode-unfold) ) (let ((str (eword-decode-unstructured + code-conversion (buffer-substring (point-min) (point-max)) - must-unfold - code-conversion))) + must-unfold))) (delete-region (point-min) (point-max)) (insert str))))) @@ -567,7 +577,9 @@ be the result." (let ((p (std11-check-enclosure string ?\" ?\"))) (if p (cons (cons 'quoted-string - (eword-decode-quoted-string (substring string 0 p))) + (eword-decode-quoted-string + (substring string 0 p) + default-mime-charset)) (substring string p)) ))) @@ -582,7 +594,9 @@ be the result." (setq p (std11-check-enclosure string ?\( ?\) t p))) (setq p (or p len)) (cons (cons 'comment - (eword-decode-comment (substring string 0 p))) + (eword-decode-comment + (substring string 0 p) + default-mime-charset)) (substring string p))) nil)))