1999-07-28 MORIOKA Tomohiko <tomo@m17n.org>
+ * 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 <tomo@m17n.org>
+
* mime-view.el (mime-raw-find-entity-from-point): Deleted.
(mime-raw-buffer): Deleted.
(mime-preview-original-major-mode): Add new optional argument
(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
(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)))
)
(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)
(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)))
(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
(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)))))
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)
""))
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)
)