+2001-11-27 Daiki Ueno <ueno@unixuser.org>
+
+ * mime-w3.el: Don't use `url-register-protocol' if it is not
+ fboundp; announce `url-cid' feature instead.
+ [cf. <Wanderlust:8566>]
+
+ (url-cid): Change return value for the current URL package.
+
2003-06-09 Yuuichi Teranishi <teranisi@gohome.org>
* pgg-gpg.el (pgg-gpg-process-region): Undo the last change;
(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