From: morioka Date: Mon, 17 Mar 1997 13:11:10 +0000 (+0000) Subject: (mime-view-insert-entity-button): modified. X-Git-Tag: Hokutetsu-Ishikawa-new~91 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87aeac9cc2f15175460a70f3e66be8879487b546;p=elisp%2Fsemi.git (mime-view-insert-entity-button): modified. --- diff --git a/mime-view.el b/mime-view.el index e9cb3a2..51d8cb0 100644 --- a/mime-view.el +++ b/mime-view.el @@ -6,7 +6,7 @@ ;; Created: 1994/7/13 ;; Renamed: 1994/8/31 from tm-body.el ;; Renamed: 1997/02/19 from tm-view.el -;; Version: $Revision: 0.39 $ +;; Version: $Revision: 0.40 $ ;; Keywords: MIME, multimedia, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -40,7 +40,7 @@ ;;; (defconst mime-view-RCS-ID - "$Id: mime-view.el,v 0.39 1997-03-17 12:50:46 morioka Exp $") + "$Id: mime-view.el,v 0.40 1997-03-17 13:11:10 morioka Exp $") (defconst mime-view-version (get-version-string mime-view-RCS-ID)) @@ -233,12 +233,11 @@ Each elements are regexp of field-name. [mime-view.el]") ;;; @@ content button ;;; -(defun mime-view-insert-entity-button - (rcnum cinfo ctype params subj encoding) +(defun mime-view-insert-entity-button (rcnum cinfo ctype params subj encoding) + "Insert entity-button." (save-restriction (narrow-to-region (point)(point)) (let ((access-type (assoc "access-type" params)) - (charset (assoc "charset" params)) (num (or (cdr (assoc "x-part-number" params)) (if (consp rcnum) (mapconcat (function @@ -262,21 +261,21 @@ Each elements are regexp of field-name. [mime-view.el]") ))) ) (t - (insert (concat "[" num " " subj)) - (let ((rest - (if (setq charset (cdr charset)) - (if encoding - (format " <%s; %s (%s)>]\n" - ctype charset encoding) - (format " <%s; %s>]\n" ctype charset) - ) - (format " <%s>]\n" ctype) - ))) - (if (>= (+ (current-column)(length rest))(window-width)) - (setq rest (concat "\n\t" rest)) - ) - (insert rest) - )))) + (let ((charset (cdr (assoc "charset" params)))) + (insert (concat "[" num " " subj)) + (let ((rest + (concat " <" ctype + (if charset + (concat "; " charset) + (if encoding (concat " (" encoding ")")) + ) + ">]\n"))) + (if (>= (+ (current-column)(length rest))(window-width)) + (insert "\n\t") + ) + (insert rest) + )))) + ) (mime-add-button (point-min)(1- (point-max)) (function mime-view-play-current-entity)) ))