mime-w3 and raw-buffer
Yoshiki Hayashi
t90553 @ mail.ecc.u-tokyo.ac.jp
1999年 12月 15日 (水) 11:33:42 JST
SEMI を眺めていて、mime-w3.el で raw-buffer を参照している部
分があることを発見しました。とりあえず、手元の heavily
modified SEMI :-) では、以下のように修正してあります。FLIM
に mime-find-root-entity を入れて欲しいのですが、どうでしょ
うか。> maintainer 様。
# 本当は mime-w3-message-structure まで消してしまう必要は無
# いです。後、一箇所括弧の位置が修正されているのは趣味です。:-)
1999-12-15 Yoshiki Hayashi <t90553 @ mail.ecc.u-tokyo.ac.jp>
* mime-w3.el (mime-w3-message-structure): Removed.
(mime-preview-text/html): Don't use mime-w3-message-structure.
(mime-find-root-entity): New function. Should be in flim.
(url-cid): Use it.
-------------- next part --------------
Index: mime-w3.el
===================================================================
RCS file: /hare/cvs/root/semi/mime-w3.el,v
retrieving revision 1.6.12.4
diff -u -r1.6.12.4 mime-w3.el
--- mime-w3.el 1999/01/25 18:30:19 1.6.12.4
+++ mime-w3.el 1999/12/15 03:04:12
@@ -27,6 +27,15 @@
(require 'w3)
(require 'mime)
+(eval-when-compile
+ (require 'poe))
+
+(defun-maybe mime-find-root-entity (entity)
+ "Return root entity of entity"
+ (while (not (mime-root-entity-p entity))
+ (setq entity (mime-entity-parent entity)))
+ entity)
+
(defmacro mime-put-keymap-region (start end keymap)
`(put-text-property ,start ,end
',(if (featurep 'xemacs)
@@ -43,12 +52,7 @@
))
(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")
@@ -61,13 +65,15 @@
(condition-case err
(w3-region p (point-max))
(error (message (format "%s" err))))
- (mime-put-keymap-region p (point-max) w3-mode-map)
- ))))
+ (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)))
+ (mime-find-root-entity
+ (get-text-property
+ (point)
+ 'mime-view-entity)))))
(when entity
(mime-insert-entity-content entity)
(setq url-current-mime-type (mime-entity-type/subtype entity))
-------------- next part --------------
--
Yoshiki Hayashi
More information about the Emacs-mime-ja
mailing list