[Mew-dist 06992] Re: PGP Sign and Config guess
Mito
mit at example.com
1998年 11月 27日 (金) 17:47:02 JST
※ "杉" こと taro at example.com さんの
『[Mew-dist 06985] PGP Sign and Config guess』より
杉> C-c C-sでメールに署名した時には、mew-config-guess-alistを利用して
杉> guessしてくれないような気がします。
key を問い合わせる機能といっしょですみませんが、添付のパッチ
でどうでしょう。
Config は使っていないので動作確認はしていません。(_ _)
# 1.94b2 用です。
--
11/27 17:44頃
NECソフトウェア新潟 水戸
mailto:mit at example.com \n
-------------- next part --------------
--- mew-pgp.el.orig Mon Aug 24 23:45:32 1998
+++ mew-pgp.el Fri Nov 27 17:38:08 1998
@@ -446,29 +446,42 @@
;;
;; shortcut methods
;;
+(defvar mew-pgp-optional-userid nil)
+(defun mew-pgp-ask-userid ()
+ (if mew-pgp-optional-userid
+ (if (stringp 'mew-pgp-optional-userid)
+ mew-pgp-optional-userid
+ (let ((completion-ignore-case t)
+ uid)
+ (setq uid (completing-read "PGP user ID: "
+ mew-pgp-optional-userid nil t))
+ (car (cdr (assoc uid mew-pgp-optional-userid)))))))
-(defun mew-pgp-sign-letter ()
+(defun mew-pgp-get-signer (arg)
+ (if mew-config-insert-when-composed
+ (mew-draft-insert-config))
+ (or (and arg (mew-pgp-ask-userid))
+ (mew-header-parse-address mew-from:) mew-mail-address))
+
+(defun mew-pgp-sign-letter (arg)
"Sign the single part draft with PGP. Input your passphrase."
- (interactive)
+ (interactive "P")
(mew-draft-before-composition-only
- (let ((mew-inherit-signer
- (or (mew-header-parse-address mew-from:) mew-mail-address)))
+ (let ((mew-inherit-signer (mew-pgp-get-signer arg)))
(mew-pgp-encode-letter (list (list mew-ct-mls mew-ct-pgs))))))
-(defun mew-pgp-encrypt-letter ()
+(defun mew-pgp-encrypt-letter (arg)
"Encrypt the single part draft with PGP."
- (interactive)
+ (interactive "P")
(mew-draft-before-composition-only
- (let ((mew-inherit-signer
- (or (mew-header-parse-address mew-from:) mew-mail-address)))
+ (let ((mew-inherit-signer (mew-pgp-get-signer arg)))
(mew-pgp-encode-letter (list (list mew-ct-mle mew-ct-pge))))))
-(defun mew-pgp-sign-encrypt-letter ()
+(defun mew-pgp-sign-encrypt-letter (arg)
"Sign then encrypt the single part draft with PGP. Input your passphrase."
- (interactive)
+ (interactive "P")
(mew-draft-before-composition-only
- (let ((mew-inherit-signer
- (or (mew-header-parse-address mew-from:) mew-mail-address)))
+ (let ((mew-inherit-signer (mew-pgp-get-signer arg)))
(mew-pgp-encode-letter (list (list mew-ct-mls mew-ct-pgs)
(list mew-ct-mle mew-ct-pge))))))
--- mew-encode.el.orig Mon Aug 24 23:45:15 1998
+++ mew-encode.el Fri Nov 27 17:33:07 1998
@@ -45,10 +45,10 @@
(replace-match " " nil t)
(mew-header-insert (read-string (concat mew-subj: " "))))))))
-(defun mew-draft-make-message ()
+(defun mew-draft-make-message (&optional arg)
"Make a MIME message. Charset guess, mapping directory structure
to multipart, and so on."
- (interactive)
+ (interactive "P")
(widen)
(mew-draft-ask-subject)
(if mew-config-insert-when-composed
@@ -59,8 +59,7 @@
(message "%s already exists!" mew-ct:))
(message "Making a MIME letter ...")
(if (mew-attach-p)
- (let ((mew-inherit-signer
- (or (mew-header-parse-address mew-from:) mew-mail-address)))
+ (let ((mew-inherit-signer (mew-pgp-get-signer arg)))
;; delete multipart syntax
(mew-attach-clear)
(if (mew-attach-valid-p)
Mew-dist メーリングリストの案内