From 517b6cd46d8e0e3140c77e6129cbc73920910a1b Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 5 Aug 1999 06:50:58 +0000 Subject: [PATCH] Sync up with the latest semi-1_13 branch. --- ChangeLog | 5 ++++ mime-view.el | 90 ++++++++++++++++++++++++++++++++-------------------------- 2 files changed, 54 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1765c02..a214f70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-08-02 MORIOKA Tomohiko + + * mime-view.el (mime-preview-follow-current-entity): + Don't use `mime-entity-buffer'. + 1999-07-30 Katsumi Yamaoka * mime-pgp.el (mime-view-application/pgp): Don't set the values of diff --git a/mime-view.el b/mime-view.el index 9e68698..cb3a937 100644 --- a/mime-view.el +++ b/mime-view.el @@ -1190,7 +1190,6 @@ It calls following-method selected from variable (format "%s-%s" (buffer-name) (reverse entity-node-id))) new-buf (the-buf (current-buffer)) - (a-buf (mime-entity-buffer entity)) fields) (save-excursion (set-buffer (setq new-buf (get-buffer-create new-name))) @@ -1200,50 +1199,59 @@ It calls following-method selected from variable (goto-char (point-min)) (insert ?\n)) (goto-char (point-min)) - (let ((entity-node-id (mime-entity-node-id entity)) ci str) - (while (progn - (setq - str - (save-excursion - (set-buffer a-buf) - (setq ci - (mime-find-entity-from-node-id entity-node-id)) - (save-restriction - (narrow-to-region - (mime-entity-point-min ci) - (mime-entity-point-max ci) - ) - (std11-header-string-except - (concat "^" - (apply (function regexp-or) fields) - ":") "")))) - (if (and (eq (mime-entity-media-type ci) 'message) - (eq (mime-entity-media-subtype ci) 'rfc822)) - nil - (if str - (insert str) - ) - entity-node-id)) + (let ((current-entity + (if (and (eq (mime-entity-media-type entity) 'message) + (eq (mime-entity-media-subtype entity) 'rfc822)) + (mime-entity-children entity) + entity)) + str) + (while (and current-entity + (progn + (setq str + (with-current-buffer + (mime-entity-header-buffer current-entity) + (save-restriction + (narrow-to-region + (mime-entity-header-start-point + current-entity) + (mime-entity-header-end-point + current-entity)) + (std11-header-string-except + (concat + "^" + (apply (function regexp-or) fields) + ":") "")))) + (if (and (eq (mime-entity-media-type + current-entity) 'message) + (eq (mime-entity-media-subtype + current-entity) 'rfc822)) + nil + (if str + (insert str) + ) + t))) (setq fields (std11-collect-field-names) - entity-node-id (cdr entity-node-id)) + current-entity (mime-entity-parent current-entity)) ) ) - (let ((rest mime-view-following-required-fields-list)) + (let ((rest mime-view-following-required-fields-list) + field-name ret) (while rest - (let ((field-name (car rest))) - (or (std11-field-body field-name) - (insert - (format - (concat field-name - ": " - (save-excursion - (set-buffer the-buf) - (set-buffer mime-mother-buffer) - (set-buffer mime-raw-buffer) - (std11-field-body field-name) - ) - "\n"))) - )) + (setq field-name (car rest)) + (or (std11-field-body field-name) + (progn + (save-excursion + (set-buffer the-buf) + (setq ret + (when mime-mother-buffer + (set-buffer mime-mother-buffer) + (mime-entity-fetch-field + (get-text-property (point) + 'mime-view-entity) + field-name)))) + (if ret + (insert (concat field-name ": " ret "\n")) + ))) (setq rest (cdr rest)) )) (mime-decode-header-in-buffer) -- 1.7.10.4