From: yamaoka Date: Sun, 14 Dec 2003 23:21:33 +0000 (+0000) Subject: merge from flim-1_14 branch. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9799a994e6ab28e9c40a0a49cf3f8052f36ed4f5;p=elisp%2Fflim.git merge from flim-1_14 branch. Could someone update `mime-product-code-name'? --- diff --git a/ChangeLog b/ChangeLog index 8977f48..0b60482 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2003-12-14 MORIOKA Tomohiko + + * mime-def.el (mime-header-accept-quoted-encoded-words): Change + default value to nil. + +2003-03-10 MORIOKA Tomohiko + + * eword-decode.el (eword-analyze-quoted-string): Decode + quoted-encoded-words when + `mime-header-accept-quoted-encoded-words' is not nil. + + * mime.el (mime-entity-filename): Decode quoted-encoded-words when + `mime-header-accept-quoted-encoded-words' is not nil. + + * mime-def.el (mime-header-accept-quoted-encoded-words): New user + option. + +2003-12-14 Tatsuya Kinoshita + + * eword-encode.el (mime-header-charset-encoding-alist): Add + entry for iso-8859-1[45]. + 2003-11-13 Yoichi NAKAYAMA * FLIM-ELS (flim-modules): Install mel-b-el also for diff --git a/VERSION b/VERSION index 5c5a4f0..a7b0b12 100644 --- a/VERSION +++ b/VERSION @@ -57,9 +57,10 @@ ;;------------------------------------------------------------------------- ;; Keihan Electric Railway $(B5~:eEE5$E4F;(B http://www.keihan.co.jp/ -;; $(B3{El@~(B +;; -DÒtò-A Line $(B3{El@~(B ;;------------------------------------------------------------------------- 1.14.5 Demachiyanagi $(B=PD.Lx(B ; <=> $(B1CEE(B +1.14.6 Marutamachi $(B4]B@D.(B [Chao Version names] diff --git a/eword-decode.el b/eword-decode.el index 328cc28..0b2d19a 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -1,6 +1,6 @@ ;;; eword-decode.el --- RFC 2047 based encoded-word decoder for GNU Emacs -;; Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software Foundation, Inc. +;; Copyright (C) 1995,96,97,98,99,2000,01,03 Free Software Foundation, Inc. ;; Author: ENAMI Tsugutomo ;; MORIOKA Tomohiko @@ -621,16 +621,17 @@ returns nil, next function is used. Otherwise the return value will be the result.") (defun eword-analyze-quoted-string (string start &optional must-unfold) - (let ((p (std11-check-enclosure string ?\" ?\" nil start))) - (if p - (cons (cons 'quoted-string - (decode-mime-charset-string - (std11-strip-quoted-pair - (substring string (1+ start) (1- p))) - default-mime-charset)) - ;;(substring string p)) - p) - ))) + (let ((p (std11-check-enclosure string ?\" ?\" nil start)) + ret) + (when p + (setq ret (decode-mime-charset-string + (std11-strip-quoted-pair + (substring string (1+ start) (1- p))) + default-mime-charset)) + (if mime-header-accept-quoted-encoded-words + (setq ret (eword-decode-string ret))) + (cons (cons 'quoted-string ret) + p)))) (defun eword-analyze-domain-literal (string start &optional must-unfold) (std11-analyze-domain-literal string start)) diff --git a/eword-encode.el b/eword-encode.el index 030e6a2..4621f20 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -46,6 +46,8 @@ (iso-8859-7 . "Q") (iso-8859-8 . "Q") (iso-8859-9 . "Q") + (iso-8859-14 . "Q") + (iso-8859-15 . "Q") (iso-2022-jp . "B") (iso-2022-jp-3 . "B") (iso-2022-kr . "B") diff --git a/mime-def.el b/mime-def.el index 5e54752..6932278 100644 --- a/mime-def.el +++ b/mime-def.el @@ -82,6 +82,12 @@ :type '(choice (integer :tag "Limit (bytes)") (const :tag "Don't limit" nil))) +(defcustom mime-header-accept-quoted-encoded-words nil + "*Accept encoded-words in quoted-strings." + :group 'mime-header + :type 'boolean) + + ;;; @@@ encoding ;;; diff --git a/mime.el b/mime.el index 005790e..161eb97 100644 --- a/mime.el +++ b/mime.el @@ -1,6 +1,6 @@ ;;; mime.el --- MIME library module -;; Copyright (C) 1998,1999,2000 Free Software Foundation, Inc. +;; Copyright (C) 1998,1999,2000,2001,2003 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Keywords: MIME, multimedia, mail, news @@ -391,13 +391,16 @@ default value." (defun mime-entity-filename (entity) "Return filename of ENTITY." (or (mime-entity-uu-filename entity) - (mime-content-disposition-filename - (mime-entity-content-disposition entity)) + (let ((ret (mime-content-disposition-filename + (mime-entity-content-disposition entity)))) + (if (and mime-header-accept-quoted-encoded-words + ret) + (eword-decode-string ret) + ret)) (cdr (let ((param (mime-content-type-parameters (mime-entity-content-type entity)))) (or (assoc "name" param) - (assoc "x-name" param)) - )))) + (assoc "x-name" param)))))) (defsubst mime-entity-media-type (entity)