From 1e28d7c2ec749121b7f9434232b7a936a8de3fe6 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 12 Aug 2003 23:55:38 +0000 Subject: [PATCH] * mime-w3.el: Don't use `url-register-protocol' if it is not fboundp; announce `url-cid' feature instead. [cf. ] (url-cid): Change return value for the current URL package. --- ChangeLog | 8 ++++++++ mime-w3.el | 23 +++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d56b34..9c43625 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-11-27 Daiki Ueno + + * mime-w3.el: Don't use `url-register-protocol' if it is not + fboundp; announce `url-cid' feature instead. + [cf. ] + + (url-cid): Change return value for the current URL package. + 2003-06-09 Yuuichi Teranishi * pgg-gpg.el (pgg-gpg-process-region): Undo the last change; diff --git a/mime-w3.el b/mime-w3.el index 598636f..32558c0 100644 --- a/mime-w3.el +++ b/mime-w3.el @@ -67,15 +67,22 @@ (defun url-cid (url &optional proxy-info) (let ((entity (mime-find-entity-from-content-id (mime-uri-parse-cid url) - mime-w3-message-structure))) + mime-w3-message-structure)) + buffer) (when entity - (mime-insert-entity-content entity) - (setq url-current-mime-type (mime-entity-type/subtype entity)) - ))) - -(url-register-protocol "cid" - 'url-cid - 'url-identity-expander) + (setq buffer (generate-new-buffer (format " *cid %s" url))) + (save-excursion + (set-buffer buffer) + (mime-insert-entity-content entity) + (if (boundp 'url-current-mime-type) + (setq url-current-mime-type (mime-entity-type/subtype entity))))) + buffer)) + +(if (fboundp 'url-register-protocol) + (url-register-protocol "cid" + 'url-cid + 'url-identity-expander) + (provide 'url-cid)) ;;; @ end -- 1.7.10.4