From: akr Date: Wed, 7 Apr 1999 11:32:19 +0000 (+0000) Subject: * mime-view.el (mime-display-application/x-postpet): New function. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fakemi-1_12;p=elisp%2Fsemi.git * mime-view.el (mime-display-application/x-postpet): New function. (mime-preview-condition): Set up for 'mime-preview-application/x-postpet. --- diff --git a/ChangeLog b/ChangeLog index bef9f84..d38c99c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-04-07 Tanaka Akira + + * mime-view.el (mime-display-application/x-postpet): New function. + (mime-preview-condition): Set up for + 'mime-preview-application/x-postpet. + 1999-03-05 Tanaka Akira * mime-edit.el (mime-edit-normalize-body): Call `enriched-encode' with diff --git a/mime-view.el b/mime-view.el index e55aca6..41e8abe 100644 --- a/mime-view.el +++ b/mime-view.el @@ -450,6 +450,12 @@ Each elements are regexp of field-name.") (ctree-set-calist-strictly 'mime-preview-condition + '((type . application)(subtype . x-postpet) + (body . visible) + (body-presentation-method . mime-display-application/x-postpet))) + +(ctree-set-calist-strictly + 'mime-preview-condition '((type . text)(subtype . t) (body . visible) (body-presentation-method . mime-display-text/plain))) @@ -539,6 +545,24 @@ Each elements are regexp of field-name.") (run-hooks 'mime-display-text/x-vcard-hook) )) +(defun mime-display-application/x-postpet (entity situation) + (save-restriction + (narrow-to-region (point-max)(point-max)) + (let ((contents (string-as-unibyte (mime-entity-content entity))) + (p 0) l + petname owner pettype from) + (setq p (+ p 30)) + (setq petname (decode-mime-charset-string (substring contents (1+ p) (setq p (+ p 1 (char-int (aref contents p))))) 'shift_jis)) + (setq owner (decode-mime-charset-string (substring contents (1+ p) (setq p (+ p 1 (char-int (aref contents p))))) 'shift_jis)) + (setq pettype (substring contents p (setq p (+ p 4)))) + (setq p (+ p 78)) + (setq from (substring contents (1+ p) (setq p (+ p 1 (char-int (aref contents p)))))) + (insert "Petname: " petname "\n" + "Owner: " owner "\n" + "Pettype: " pettype "\n" + "From: " from "\n") + (run-hooks 'mime-display-application/x-postpet-hook)))) + (defvar mime-view-announcement-for-message/partial (if (and (>= emacs-major-version 19) window-system) "\