X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mime-view.el;h=b7422ab3e81ddc95c7bf2d993cef7f9b6504a5da;hb=f00b382b7ffb234b4105bd9be2d184af4fc61a9c;hp=7e592dbf35122da770e98adc1f7117aba2a5fd95;hpb=bf45517f78fdfcb973ebbf9ea7ff94f1386dc27d;p=elisp%2Fsemi.git diff --git a/mime-view.el b/mime-view.el index 7e592db..b7422ab 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.7 $ +;; Version: $Revision: 0.22 $ ;; Keywords: MIME, multimedia, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -28,14 +28,10 @@ ;;; Code: -(require 'tl-str) -(require 'tl-list) -(require 'tl-atype) -(require 'tl-misc) +(require 'cl) (require 'std11) (require 'mel) -(require 'tm-ew-d) -(require 'tm-def) +(require 'eword-decode) (require 'mime-parse) (require 'mime-text) @@ -44,7 +40,7 @@ ;;; (defconst mime-view-RCS-ID - "$Id: mime-view.el,v 0.7 1997-02-21 08:04:42 tmorioka Exp $") + "$Id: mime-view.el,v 0.22 1997-03-10 13:44:24 morioka Exp $") (defconst mime-view-version (get-version-string mime-view-RCS-ID)) @@ -125,6 +121,10 @@ (method . mime-article/decode-message/partial) (mode . "play") ) + ((type . "message/external-body") + ("access-type" . "anon-ftp") + (method . mime-article/decode-message/external-ftp) + ) ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file) (mode . "play") @@ -234,7 +234,7 @@ Each elements are regexp of field-name. [mime-view.el]") (narrow-to-region (point)(point)) (let ((access-type (assoc "access-type" params)) (charset (assoc "charset" params)) - (num (or (assoc-value "x-part-number" params) + (num (or (cdr (assoc "x-part-number" params)) (if (consp rcnum) (mapconcat (function (lambda (num) @@ -249,8 +249,8 @@ Each elements are regexp of field-name. [mime-view.el]") (if server (insert (format "[%s %s ([%s] %s)]\n" num subj access-type (cdr server))) - (let ((site (assoc-value "site" params)) - (dir (assoc-value "directory" params)) + (let ((site (cdr (assoc "site" params))) + (dir (cdr (assoc "directory" params))) ) (insert (format "[%s %s ([%s] %s:%s)]\n" num subj access-type site dir)) @@ -272,8 +272,8 @@ Each elements are regexp of field-name. [mime-view.el]") ) (insert rest) )))) - (tm:add-button (point-min)(1- (point-max)) - (function mime-view-play-content)) + (mime-add-button (point-min)(1- (point-max)) + (function mime-view-play-content)) )) (defun mime-preview/default-content-button-function @@ -315,7 +315,7 @@ Each elements are regexp of field-name. [mime-view.el]") (defun mime-view-default-content-header-filter () (mime-preview/cut-header) - (mime/decode-message-header) + (eword-decode-header) ) (defvar mime-view-content-header-filter-alist nil) @@ -504,7 +504,7 @@ The compressed face will be piped to this command.") (save-restriction (narrow-to-region beg end) (setq subj - (mime-eword/decode-string + (eword-decode-string (mime-article/get-subject params encoding))) ) (set-buffer obuf) @@ -581,8 +581,8 @@ The compressed face will be piped to this command.") (let ((be (point-max))) (narrow-to-region be be) (insert mime-view-announcement-for-message/partial) - (tm:add-button (point-min)(point-max) - (function mime-view-play-content)) + (mime-add-button (point-min)(point-max) + (function mime-view-play-content)) ))) (defun mime-article/get-uu-filename (param &optional encoding) @@ -713,22 +713,25 @@ The compressed face will be piped to this command.") ) "Menu for MIME Viewer") -(if running-xemacs - (progn - (defvar mime-view-xemacs-popup-menu - (cons mime-view-menu-title - (mapcar (function - (lambda (item) - (vector (nth 1 item)(nth 2 item) t) - )) - mime-view-menu-list))) - (defun mime-view-xemacs-popup-menu (event) - "Popup the menu in the MIME Viewer buffer" - (interactive "e") - (select-window (event-window event)) - (set-buffer (event-buffer event)) - (popup-menu 'mime-view-xemacs-popup-menu)) - )) +(cond (running-xemacs + (defvar mime-view-xemacs-popup-menu + (cons mime-view-menu-title + (mapcar (function + (lambda (item) + (vector (nth 1 item)(nth 2 item) t) + )) + mime-view-menu-list))) + (defun mime-view-xemacs-popup-menu (event) + "Popup the menu in the MIME Viewer buffer" + (interactive "e") + (select-window (event-window event)) + (set-buffer (event-buffer event)) + (popup-menu 'mime-view-xemacs-popup-menu)) + (defvar mouse-button-2 'button2) + ) + (t + (defvar mouse-button-2 [mouse-2]) + )) (defun mime-view-define-keymap (&optional default) (let ((mime-view-mode-map (if (keymapp default) @@ -781,7 +784,7 @@ The compressed face will be piped to this command.") )) (if mouse-button-2 (define-key mime-view-mode-map - mouse-button-2 (function tm:button-dispatcher)) + mouse-button-2 (function mime-button-dispatcher)) ) (cond (running-xemacs (define-key mime-view-mode-map @@ -1008,7 +1011,7 @@ button-2 Move to point under the mouse cursor )) (setq rest (cdr rest)) )) - (mime/decode-message-header) + (eword-decode-header) ) (let ((f (cdr (assq mode mime-view-following-method-alist)))) (if (functionp f)