From: Lars Ingebrigtsen Date: Fri, 12 Feb 2016 06:21:33 +0000 (+1100) Subject: Fix epg-related compilation warnings in mml-sec X-Git-Tag: emacs-26.0.90~2610 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=93c3363523be0df353ddd9653494bec8dc57fd8c;p=emacs.git Fix epg-related compilation warnings in mml-sec * lisp/gnus/mml-sec.el: Fix compilation warnings from the epg library. --- diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 5bfed9fb254..e23fb1a27f2 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -27,6 +27,9 @@ (require 'gnus-util) (require 'epg) +(require 'epa) +(require 'password-cache) +(require 'mm-encode) (autoload 'mail-strip-quoted-names "mail-utils") (autoload 'mml2015-sign "mml2015") @@ -43,6 +46,8 @@ (autoload 'mml-smime-verify "mml-smime") (autoload 'mml-smime-verify-test "mml-smime") (autoload 'epa--select-keys "epa") +(autoload 'message-options-get "message") +(autoload 'message-options-set "message") (defvar mml-sign-alist '(("smime" mml-smime-sign-buffer mml-smime-sign-query) @@ -110,10 +115,7 @@ details." :group 'message :type 'boolean) -(defcustom mml-secure-cache-passphrase - (if (boundp 'password-cache) - password-cache - t) +(defcustom mml-secure-cache-passphrase password-cache "If t, cache OpenPGP or S/MIME passphrases inside Emacs. Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead. See Info node `(message) Security'." @@ -623,7 +625,7 @@ Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead." The passphrase is read and cached." ;; Based on mml2015-epg-passphrase-callback. (if (eq key-id 'SYM) - (epg-passphrase-callback-function context key-id nil) + (epa-passphrase-callback-function context key-id nil) (let* ((password-cache-key-id (if (eq key-id 'PIN) "PIN" @@ -907,10 +909,10 @@ If no one is selected, symmetric encryption will be performed. " cipher signers) (when sign (setq signers (mml-secure-signers context signer-names)) - (epg-context-set-signers context signers)) + (setf (epg-context-signers context) signers)) (when (eq 'OpenPGP protocol) - (epg-context-set-armor context t) - (epg-context-set-textmode context t)) + (setf (epg-context-armor context) t) + (setf (epg-context-textmode context) t)) (when (mml-secure-cache-passphrase-p protocol) (epg-context-set-passphrase-callback context @@ -935,9 +937,9 @@ If no one is selected, symmetric encryption will be performed. " (signers (mml-secure-signers context signer-names)) signature micalg) (when (eq 'OpenPGP protocol) - (epg-context-set-armor context t) - (epg-context-set-textmode context t)) - (epg-context-set-signers context signers) + (setf (epg-context-armor context) t) + (setf (epg-context-textmode context) t)) + (setf (epg-context-signers context) signers) (when (mml-secure-cache-passphrase-p protocol) (epg-context-set-passphrase-callback context