From: morioka Date: Tue, 2 Jun 1998 17:27:32 +0000 (+0000) Subject: (mime-method-to-display-message/rfc822): Use X-Git-Tag: remi-1_5_0~4 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fe2271c1249ec1e7ac0ea79d1505ec4e4f47164;p=elisp%2Fsemi.git (mime-method-to-display-message/rfc822): Use `mime-raw-representation-type-alist' instead of `mime-text-decoder-alist'; set up to `mime-raw-representation-type' instead of `mime-text-decoder'. (mime-method-to-display-caesar): Use `mime-text-insert-decoded-body'. --- diff --git a/mime-play.el b/mime-play.el index a7326a0..1bf476d 100644 --- a/mime-play.el +++ b/mime-play.el @@ -420,9 +420,9 @@ It is registered to variable `mime-preview-quitting-method-alist'." (let* ((cnum (mime-raw-point-to-entity-number beg)) (new-name (format "%s-%s" (buffer-name) cnum)) (mother mime-preview-buffer) - (text-decoder - (cdr (or (assq major-mode mime-text-decoder-alist) - (assq t mime-text-decoder-alist)))) + (representation-type + (cdr (or (assq major-mode mime-raw-representation-type-alist) + (assq t mime-raw-representation-type-alist)))) str) (setq str (buffer-substring beg end)) (switch-to-buffer new-name) @@ -433,7 +433,7 @@ It is registered to variable `mime-preview-quitting-method-alist'." (delete-region (point-min) (match-end 0)) ) (setq major-mode 'mime-show-message-mode) - (setq mime-text-decoder text-decoder) + (setq mime-raw-representation-type representation-type) (mime-view-mode mother) )) @@ -606,14 +606,14 @@ to write." (defun mime-method-to-display-caesar (start end cal) "Internal method for mime-view to display ROT13-47-48 message." - (let* ((cnum (mime-raw-point-to-entity-number start)) + (let* ((entity (mime-raw-find-entity-from-point start)) + (cnum (reverse (mime-entity-node-id entity))) (new-name (format "%s-%s" (buffer-name) cnum)) (the-buf (current-buffer)) (mother mime-preview-buffer) (charset (cdr (assoc "charset" cal))) (encoding (cdr (assq 'encoding cal))) - (mode major-mode) - ) + (mode major-mode)) (let ((pwin (or (get-buffer-window mother) (get-largest-window))) (buf (get-buffer-create new-name)) @@ -624,16 +624,7 @@ to write." ) (setq buffer-read-only nil) (erase-buffer) - (insert-buffer-substring the-buf start end) - (goto-char (point-min)) - (if (re-search-forward "^\n" nil t) - (delete-region (point-min) (match-end 0)) - ) - (let ((m (cdr (or (assq mode mime-text-decoder-alist) - (assq t mime-text-decoder-alist))))) - (and (functionp m) - (funcall m charset encoding) - )) + (mime-text-insert-decoded-body entity) (mule-caesar-region (point-min) (point-max)) (set-buffer-modified-p nil) (set-buffer mother)