X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=wl%2Fwl-mime.el;h=18c3034f45a51787118047105f2c1868b638147b;hb=709366cf00291239e4287abb0b2105ad47fdbf59;hp=7984588e1745356002fd6cb2fff2e59c36e7eba2;hpb=7cf0d9c7ee1e9824a402f1b58747c9e386ab5301;p=elisp%2Fwanderlust.git diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 7984588..18c3034 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -69,15 +69,16 @@ By setting following-method as yank-content." (defalias 'wl-draft-enclose-digest-region 'mime-edit-enclose-digest-region) (defun wl-draft-preview-message () - "" + "Preview editing message." (interactive) (let* (recipients-message + (current-point (point)) (config-exec-flag wl-draft-config-exec-flag) (parent-folder wl-draft-parent-folder) (mime-display-header-hook 'wl-highlight-headers) (mime-header-encode-method-alist (append - '((wl-draft-eword-encode-address-list + '((wl-draft-eword-encode-address-list . (To Cc Bcc Resent-To Resent-Cc Bcc Resent-Bcc))) (if (boundp 'mime-header-encode-method-alist) (symbol-value 'mime-header-encode-method-alist)))) @@ -89,6 +90,7 @@ By setting following-method as yank-content." (lambda () (let ((wl-draft-config-exec-flag config-exec-flag) (wl-draft-parent-folder parent-folder)) + (goto-char current-point) (run-hooks 'wl-draft-send-hook) (setq recipients-message (condition-case err @@ -224,7 +226,7 @@ By setting following-method as yank-content." (setq filename (read-file-name "Please set filename (not directory): " filename))) (if (and (file-exists-p filename) - (not (yes-or-no-p (format "File %s exists. Save anyway? " + (not (yes-or-no-p (format "File %s exists. Save anyway? " filename)))) (message "Not saved") (setq wl-mime-save-directory (file-name-directory filename)) @@ -307,6 +309,14 @@ By setting following-method as yank-content." (elmo-mime-insert-header entity situation) (wl-highlight-headers))) +(defun wl-mime-decrypt-application/pgp-encrypted (entity situation) + (let ((summary-buffer wl-message-buffer-cur-summary-buffer) + (original-buffer wl-message-buffer-original-buffer)) + (mime-decrypt-application/pgp-encrypted entity situation) + (setq wl-message-buffer-cur-summary-buffer summary-buffer) + (setq wl-message-buffer-original-buffer original-buffer))) + + ;;; Setup methods. (defun wl-mime-setup () (set-alist 'mime-preview-quitting-method-alist @@ -338,6 +348,12 @@ By setting following-method as yank-content." (ctree-set-calist-strictly 'mime-acting-condition + '((type . application) (subtype . pgp-encrypted) + (method . wl-mime-decrypt-application/pgp-encrypted) + (major-mode . wl-original-message-mode))) + + (ctree-set-calist-strictly + 'mime-acting-condition '((mode . "extract") (major-mode . wl-original-message-mode) (method . wl-mime-save-content)))