From 40b50c640dcfadd220cf542444b599c91e970a3d Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 28 Jul 1999 23:21:33 +0000 Subject: [PATCH] Sync up with the latest semi-1_13 branch. --- ChangeLog | 23 +++++++++++++++++++++++ mime-bbdb.el | 6 +++--- mime-partial.el | 2 +- mime-pgp.el | 2 +- mime-play.el | 25 ++++++++++++++----------- mime-view.el | 17 ++++++++--------- 6 files changed, 50 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7f2219..84f0e68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,28 @@ 1999-07-28 MORIOKA Tomohiko + * mime-view.el (mime-view-entity-title): Use + `mime-entity-read-field' instead of `mime-read-field'. + (mime-display-message): Use `major-mode' of + mime-entity-header-buffer as the default value of + original-major-mode. + + * mime-play.el (mime-entity-safe-filename): Use + `mime-entity-read-field' instead of `mime-read-field'. + (mime-view-message/rfc822): New implementation. + + * mime-pgp.el (mime-add-application/pgp-keys): Use + `mime-entity-number' instead of `mime-raw-point-to-entity-number'. + + * mime-partial.el + (mime-combine-message/partial-pieces-automatically): Use + `mime-entity-read-field' instead of `mime-read-field'. + + * mime-bbdb.el (mime-bbdb/update-record): Use + `mime-entity-read-field' instead of `mime-read-field'; use + `mime-entity-fetch-field' instead of `mime-fetch-field'. + +1999-07-28 MORIOKA Tomohiko + * mime-view.el (mime-raw-find-entity-from-point): Deleted. (mime-raw-buffer): Deleted. (mime-preview-original-major-mode): Add new optional argument diff --git a/mime-bbdb.el b/mime-bbdb.el index 62bc191..1b61d64 100644 --- a/mime-bbdb.el +++ b/mime-bbdb.el @@ -161,13 +161,13 @@ the user confirms the creation." (if bbdb-use-pop-up (mime-bbdb/pop-up-bbdb-buffer offer-to-create) (let* ((message (get-text-property (point-min) 'mime-view-entity)) - (from (mime-fetch-field 'From message)) + (from (mime-entity-fetch-field message 'From)) addr) (if (or (null from) - (null (setq addr (car (mime-read-field 'From message)))) + (null (setq addr (car (mime-entity-read-field message 'From)))) (string-match (bbdb-user-mail-names) (std11-address-string addr))) - (setq from (or (mime-fetch-field 'To message) + (setq from (or (mime-entity-fetch-field message 'To) from)) ) (if from diff --git a/mime-partial.el b/mime-partial.el index 733f7f3..618c5a6 100644 --- a/mime-partial.el +++ b/mime-partial.el @@ -55,7 +55,7 @@ automatically." (not (y-or-n-p "Merge partials?")) ) (mime-store-message/partial-piece entity situation) - (setq subject-id (mime-read-field 'Subject entity)) + (setq subject-id (mime-entity-read-field entity 'Subject)) (if (string-match "[0-9\n]+" subject-id) (setq subject-id (substring subject-id 0 (match-beginning 0))) ) diff --git a/mime-pgp.el b/mime-pgp.el index fd0203a..b26230d 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -225,7 +225,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") (defun mime-add-application/pgp-keys (entity situation) (let* ((start (mime-entity-point-min entity)) (end (mime-entity-point-max entity)) - (entity-number (mime-raw-point-to-entity-number start)) + (entity-number (mime-entity-number entity)) (new-name (format "%s-%s" (buffer-name) entity-number)) (encoding (cdr (assq 'encoding situation))) str) diff --git a/mime-play.el b/mime-play.el index c7ca316..0c13092 100644 --- a/mime-play.el +++ b/mime-play.el @@ -431,8 +431,8 @@ window.") (let ((filename (or (mime-entity-filename entity) (let ((subj - (or (mime-read-field 'Content-Description entity) - (mime-read-field 'Subject entity)))) + (or (mime-entity-read-field entity 'Content-Description) + (mime-entity-read-field entity 'Subject)))) (if (and subj (or (string-match mime-view-file-name-regexp-1 subj) (string-match mime-view-file-name-regexp-2 subj))) @@ -533,15 +533,18 @@ It is registered to variable `mime-preview-quitting-method-alist'." (let* ((new-name (format "%s-%s" (buffer-name) (mime-entity-number entity))) (mother (current-buffer)) - (children (car (mime-entity-children entity)))) - (set-buffer (get-buffer-create new-name)) - (erase-buffer) - (mime-insert-entity children) - (setq mime-message-structure children) - (setq major-mode 'mime-show-message-mode) - (mime-view-buffer (current-buffer) nil mother - nil (if (mime-entity-cooked-p entity) 'cooked)) - )) + (children (car (mime-entity-children entity))) + (preview-buffer + (mime-display-message + children new-name mother nil + (cdr (assq 'major-mode + (get-text-property (point) 'mime-view-situation)))))) + (or (get-buffer-window preview-buffer) + (let ((m-win (get-buffer-window mother))) + (if m-win + (set-window-buffer m-win preview-buffer) + (switch-to-buffer preview-buffer) + ))))) ;;; @ message/partial diff --git a/mime-view.el b/mime-view.el index 4f539dd..3914cf3 100644 --- a/mime-view.el +++ b/mime-view.el @@ -130,7 +130,7 @@ mother-buffer." (set-buffer mime-mother-buffer) (mime-preview-original-major-mode recursive) ) - (cdr (assq 'original-major-mode + (cdr (assq 'major-mode (get-text-property (or point (point)) 'mime-view-situation))))) @@ -220,8 +220,8 @@ mother-buffer." situation)) (defun mime-view-entity-title (entity) - (or (mime-read-field 'Content-Description entity) - (mime-read-field 'Subject entity) + (or (mime-entity-read-field entity 'Content-Description) + (mime-entity-read-field entity 'Subject) (mime-entity-filename entity) "")) @@ -970,19 +970,18 @@ function. If it is a keymap, keymap of MIME-View mode will be added to it. If it is a function, it will be bound as default binding of keymap of MIME-View mode." (mime-maybe-hide-echo-buffer) - (let ((win-conf (current-window-configuration)) - ;; (raw-buffer (mime-entity-buffer message)) - ) + (let ((win-conf (current-window-configuration))) (or preview-buffer (setq preview-buffer (concat "*Preview-" (mime-entity-name message) "*"))) - ;; (set-buffer raw-buffer) - ;; (setq mime-preview-buffer preview-buffer) + (or original-major-mode + (setq original-major-mode + (with-current-buffer (mime-entity-header-buffer message) + major-mode))) (let ((inhibit-read-only t)) (set-buffer (get-buffer-create preview-buffer)) (widen) (erase-buffer) - ;; (setq mime-raw-buffer raw-buffer) (if mother (setq mime-mother-buffer mother) ) -- 1.7.10.4