2002-02-19 Yuuichi Teranishi <teranisi@gohome.org>
+ * 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 <okada@opaopa.org>
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))
(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)
(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)
(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
(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))
(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)