From 446d0b3bc7b1564d6bb763b41a80e643ff3c0007 Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 19 Feb 2002 03:27:41 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-set-message-buffer-or-redisplay): Call `wl-summary-redisplay-no-mime-internal' instead of `wl-summary-redisplay-no-mime'. (wl-summary-redisplay-no-mime): Changed argument; Call `wl-summary-redisplay-no-mime-internal'. * wl-mime.el (wl-draft-preview-message): Bind `mime-header-encode-method-alist' locally. * wl-draft.el (wl-draft-eword-encode-address-list): New function. (wl-draft-std11-parse-addresses): Added the first address check. (wl-draft-send): Bind `mime-header-encode-method-alist' locally. --- wl/ChangeLog | 13 +++++++++++++ wl/wl-draft.el | 22 ++++++++++++++++++++-- wl/wl-mime.el | 5 +++++ wl/wl-summary.el | 16 +++++++++++++--- 4 files changed, 51 insertions(+), 5 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 8ea6139..8f5b900 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,18 @@ 2002-02-19 Yuuichi Teranishi + * wl-summary.el (wl-summary-set-message-buffer-or-redisplay): Call + `wl-summary-redisplay-no-mime-internal' instead of + `wl-summary-redisplay-no-mime'. + (wl-summary-redisplay-no-mime): Changed argument; + Call `wl-summary-redisplay-no-mime-internal'. + + * wl-mime.el (wl-draft-preview-message): Bind + `mime-header-encode-method-alist' locally. + + * wl-draft.el (wl-draft-eword-encode-address-list): New function. + (wl-draft-std11-parse-addresses): Added the first address check. + (wl-draft-send): Bind `mime-header-encode-method-alist' locally. + * Version number is increased to 2.9.7. 2002-02-16 Kenichi OKADA diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 965960d..55d6dd1 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -853,8 +853,21 @@ to find out how to use this." msg-id-list)))) (nreverse msg-id-list))) +(defun wl-draft-eword-encode-address-list (string &optional column) + "Encode header field STRING as list of address, and return the result. +Cause an error when STRING contains invalid address. +Optional argument COLUMN is start-position of the field." + (car (eword-encode-rword-list + (or column eword-encode-default-start-column) + (eword-encode-addresses-to-rword-list + (wl-draft-std11-parse-addresses (std11-lexical-analyze string)))))) + (defun wl-draft-std11-parse-addresses (lal) (let ((ret (std11-parse-address lal))) + (when (and (not (and (eq (length lal) 1) + (eq (car (car lal)) 'spaces))) + (null ret)) + (error "Error while parsing address")) (if ret (let ((dest (list (car ret)))) (setq lal (cdr ret)) @@ -1194,7 +1207,13 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (not (wl-message-news-p))) (error "No recipient is specified")) (expand-abbrev) ; for mail-abbrevs - (run-hooks 'mail-send-hook) ; translate buffer + (let ((mime-header-encode-method-alist + (append + '((wl-draft-eword-encode-address-list + . (To Cc Bcc Resent-To Resent-Cc Bcc Resent-Bcc))) + mime-header-encode-method-alist))) + (run-hooks 'mail-send-hook) ; translate buffer + ) (if wl-draft-verbose-send (message (or mes-string "Sending..."))) (funcall wl-draft-send-function editing-buffer kill-when-done) @@ -1444,7 +1463,6 @@ Derived from `message-save-drafts' in T-gnus." (wl-draft-prepare-edit) (if (interactive-p) (run-hooks 'wl-mail-setup-hook)) - (goto-char (point-min)) (wl-user-agent-compose-internal) ;; user-agent (cond ((eq this-command 'wl-summary-write-current-newsgroup) diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 90418af..4bc9670 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -74,6 +74,11 @@ By setting following-method as yank-content." (let* (recipients-message (config-exec-flag wl-draft-config-exec-flag) (mime-display-header-hook 'wl-highlight-headers) + (mime-header-encode-method-alist + (append + '((wl-draft-eword-encode-address-list + . (To Cc Bcc Resent-To Resent-Cc Bcc Resent-Bcc))) + mime-header-encode-method-alist)) mime-view-ignored-field-list ; all header. (mime-edit-translate-buffer-hook (append diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 2606e9c..24f0637 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4636,7 +4636,7 @@ Return t if message exists." (set-buffer wl-message-buffer) t) (if (wl-summary-no-mime-p folder) - (wl-summary-redisplay-no-mime folder number) + (wl-summary-redisplay-no-mime-internal folder number) (wl-summary-redisplay-internal folder number)) (when (buffer-live-p wl-message-buffer) (set-buffer wl-message-buffer)) @@ -5251,8 +5251,18 @@ Use function list is `wl-summary-write-current-folder-functions'." (run-hooks 'wl-summary-redisplay-hook)) (message "No message to display.")))) -(defun wl-summary-redisplay-no-mime (&optional folder number) - (interactive) +(defun wl-summary-redisplay-no-mime (&optional ask-coding) + "Display message without MIME decoding. +If ASK-CODING is non-nil, coding-system for the message is asked." + (interactive "P") + (let ((elmo-mime-display-as-is-coding-system + (if ask-coding + (or (read-coding-system "Coding system: ") + elmo-mime-display-as-is-coding-system) + elmo-mime-display-as-is-coding-system))) + (wl-summary-redisplay-no-mime-internal))) + +(defun wl-summary-redisplay-no-mime-internal (&optional folder number) (let* ((fld (or folder wl-summary-buffer-elmo-folder)) (num (or number (wl-summary-message-number))) wl-break-pages) -- 1.7.10.4