From 04eac7b8fb7a46888a4fa967e962ab2bac4543a4 Mon Sep 17 00:00:00 2001 From: ueno Date: Tue, 27 Nov 2001 09:08:04 +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. --- mime-w3.el | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/mime-w3.el b/mime-w3.el index 4d69c35..2279b65 100644 --- a/mime-w3.el +++ b/mime-w3.el @@ -65,14 +65,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