* wl-summary.el (wl-summary-redisplay-internal): If `elmo-message-use-cache-p'
[elisp/wanderlust.git] / wl / wl-mime.el
index 1847b6f..18c3034 100644 (file)
@@ -72,6 +72,7 @@ By setting following-method as yank-content."
   "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)
@@ -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
@@ -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)))