From 7f1fc49bb9b23fa836b9cbf8c3829011ad8aa911 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 28 Oct 1998 22:27:48 +0000 Subject: [PATCH] (mime-insert-header-from-buffer): Refer `mime-field-decoder-alist' instead of hard-coding. --- mmgeneric.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mmgeneric.el b/mmgeneric.el index 6d67b99..9ae35db 100644 --- a/mmgeneric.el +++ b/mmgeneric.el @@ -148,6 +148,10 @@ &optional invisible-fields visible-fields) (let ((the-buf (current-buffer)) + (decoder-alist + (cdr (or (assq 'folding mime-field-decoder-alist) + (assq t mime-field-decoder-alist)))) + field-decoder f-b p f-e field-name len field field-body) (save-excursion (set-buffer buffer) @@ -164,19 +168,15 @@ visible-fields invisible-fields) (setq field (intern (capitalize (buffer-substring f-b (1- p)))) - field-body (buffer-substring p f-e)) + field-body (buffer-substring p f-e) + field-decoder (cdr (or (assq field decoder-alist) + (assq t decoder-alist)))) (with-current-buffer the-buf (insert field-name) - (insert - (if (memq field eword-decode-ignored-field-list) - ;; Don't decode - field-body - (if (memq field eword-decode-structured-field-list) - ;; Decode as structured field - (eword-decode-and-fold-structured-field field-body len) - ;; Decode as unstructured field - (eword-decode-unstructured-field-body field-body len) - ))) + (insert (if field-decoder + (funcall field-decoder field-body len) + ;; Don't decode + field-body)) (insert "\n") ))))))) -- 1.7.10.4