From: morioka Date: Sun, 24 Jan 1999 12:35:39 +0000 (+0000) Subject: (mime-w3-message-structure): New variable. X-Git-Tag: semi-1_13-199901241900~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=828207e9bf0dc5c7961faf48fe94c76fbe2b6612;p=elisp%2Fsemi.git (mime-w3-message-structure): New variable. (mime-preview-text/html): Set up `mime-w3-message-structure'. (url-cid): New function; set up as registered-protocol of url. --- diff --git a/mime-w3.el b/mime-w3.el index a3d3349..974d675 100644 --- a/mime-w3.el +++ b/mime-w3.el @@ -1,6 +1,6 @@ ;;; mime-w3.el --- mime-view content filter for text -;; Copyright (C) 1994,1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1994,1995,1996,1997,1998,1999 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Keywords: HTML, MIME, multimedia, mail, news @@ -43,7 +43,12 @@ )) (cons 'progn body))) +(defvar mime-w3-message-structure nil) + (defun mime-preview-text/html (entity situation) + (setq mime-w3-message-structure + (with-current-buffer (mime-entity-buffer entity) + mime-message-structure)) (goto-char (point-max)) (let ((p (point))) (insert "\n") @@ -57,6 +62,19 @@ (mime-put-keymap-region p (point-max) w3-mode-map) )))) +(defun url-cid (url &optional proxy-info) + (let ((entity + (mime-find-entity-from-content-id (mime-uri-parse-cid url) + mime-w3-message-structure))) + (when entity + (insert (mime-entity-content entity)) + (setq url-current-mime-type (mime-entity-type/subtype entity)) + ))) + +(url-register-protocol "cid" + 'url-cid + 'url-identity-expander) + ;;; @ end ;;;