;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP)
;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009 Free Software Foundation, Inc.
+;; 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: PGP MIME MML
;; For Emacs < 22.2.
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
+
+ (if (locate-library "password-cache")
+ (require 'password-cache)
+ (require 'password)))
(eval-when-compile (require 'cl))
(require 'mm-decode)
cipher)
(mm-with-unibyte-current-buffer
(with-temp-buffer
+ (mm-disable-multibyte)
;; set up a function to call the correct gpg encrypt routine
;; with the right arguments. (FIXME: this should be done
;; differently.)
(autoload 'epg-expand-group "epg-config")
(autoload 'epa-select-keys "epa")
-(defvar password-cache-expiry)
-
(defvar mml2015-epg-secret-key-id-list nil)
(defun mml2015-epg-passphrase-callback (context key-id ignore)
(let ((pointer (epg-key-sub-key-list (car keys))))
(while pointer
(if (and (memq usage (epg-sub-key-capability (car pointer)))
+ (not (memq 'disabled (epg-sub-key-capability (car pointer))))
(not (memq (epg-sub-key-validity (car pointer))
'(revoked expired))))
(throw 'found (car keys)))
(or (message-options-get 'mml2015-epg-signers)
(message-options-set
'mml2015-epg-signers
- (if mml2015-verbose
+ (if (eq mm-sign-option 'guided)
(epa-select-keys context "\
Select keys for signing.
If no one is selected, default secret key is used. "
(unless mml2015-signers
(error "mml2015-signers not set"))
(setq recipients (nconc recipients mml2015-signers)))
- (if mml2015-verbose
+ (if (eq mm-encrypt-option 'guided)
(setq recipients
(epa-select-keys context "\
Select recipients for encryption.
(or (message-options-get 'mml2015-epg-signers)
(message-options-set
'mml2015-epg-signers
- (if mml2015-verbose
+ (if (eq mm-sign-option 'guided)
(epa-select-keys context "\
Select keys for signing.
If no one is selected, default secret key is used. "
(provide 'mml2015)
-;; arch-tag: b04701d5-0b09-44d8-bed8-de901bf435f2
;;; mml2015.el ends here