X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime.el;h=9dc2fcc5b74b6404fa5f1bf55b279141a867cbd5;hb=6260b782ec94886678bc08ecf41d7fa91fa6c9c5;hp=2160569835a3453bca680537a26a222307e1411f;hpb=20907be1f390950804561ab0d131e27534f15647;p=elisp%2Fflim.git diff --git a/mime.el b/mime.el index 2160569..9dc2fcc 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 @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -144,10 +144,9 @@ If MESSAGE is specified, it is regarded as root entity." (defun mime-find-root-entity (entity) "Return root entity of ENTITY." - (let ((p (mime-entity-parent entity))) - (if (null p) - entity - (mime-entity-parent p)))) + (while (not (mime-root-entity-p entity)) + (setq entity (mime-entity-parent entity))) + entity) ;;; @ Header buffer (obsolete) @@ -333,7 +332,7 @@ default value." (prog1 field-name (setq field-name (symbol-name field-name))) - (intern (capitalize (capitalize field-name)))))) + (intern (capitalize field-name))))) (cond ((eq sym 'Content-Type) (mime-entity-content-type entity) ) @@ -392,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)