1999-04-14 Katsumi Yamaoka <yamaoka@jpl.org>
+ * mime-edit.el (mime-edit-insert-key): Prompt for user id if prefix
+ arg is given.
+
+ * mime-mc.el (mime-mc-insert-public-key): Fix bug - referring to
+ undefined variable.
+
+1999-04-14 Katsumi Yamaoka <yamaoka@jpl.org>
+
* mime-ui-en.texi, mime-ui-ja.texi: Sync up with .sgml files.
* mime-ui-en.sgml, mime-ui-ja.sgml: Modify a description for
simplified `pgp-function-alist'.
(mime-edit-enclose-region-internal 'kazu-encrypted beg end)
)
-(defun mime-edit-insert-key (&optional arg)
- "Insert a pgp public key."
- (interactive "P")
+(defun mime-edit-insert-key (&optional userid)
+ "Insert a pgp public key. With prefix arg, prompts for user id to use."
+ (interactive (if current-prefix-arg
+ (list (read-string "User ID: "))
+ ))
(mime-edit-insert-tag "application" "pgp-keys")
(mime-edit-define-encoding "7bit")
- (funcall (pgp-function 'insert-key))
+ (funcall (pgp-function 'insert-key) userid)
)
)
(defun mime-mc-insert-public-key (&optional userid)
- "Insert your public key at point. With one prefix arg, prompts for
-user id to use."
- (let ((not-loaded (not (fboundp (intern (format "mc-%s-insert-public-key"
- pgp-version)))))
- (comment (mime-mc-comment))
+ "Insert your public key at point."
+ (or (fboundp (intern (format "mc-%s-insert-public-key" pgp-version)))
+ (load (concat "mc-" (cdr (assq pgp-version '((gpg . "gpg")
+ (pgp50 . "pgp5")
+ (pgp . "pgp")))))))
+ (let ((comment (mime-mc-comment))
+ (mc-comment (intern (format "mc-%s-comment" pgp-version)))
(scheme (intern (format "mc-scheme-%s" pgp-version))))
- (cond ((eq 'gpg pgp-version)
- (if not-loaded
- (load "mc-gpg")
- )
- (let ((mc-gpg-comment (if comment "DUMMY")))
- (mc-insert-public-key userid scheme))
- )
- ((eq 'pgp50 pgp-version)
- (if not-loaded
- (load "mc-pgp5")
- )
- (let ((mc-pgp50-comment (if comment "DUMMY")))
- (mc-insert-public-key userid scheme))
- )
- (t
- (if not-loaded
- (load "mc-pgp")
- )
- (let ((mc-pgp-comment (if comment "DUMMY")))
- (mc-insert-public-key userid scheme))
- ))
+ (eval (` (let (((, mc-comment) (if (, comment) "DUMMY")))
+ (mc-insert-public-key (, userid) (quote (, scheme)))
+ )))
(if comment
(mime-mc-replace-comment-field comment)
)))