diff options
| author | Lars Ingebrigtsen | 2016-02-12 17:21:33 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-12 17:21:33 +1100 |
| commit | 93c3363523be0df353ddd9653494bec8dc57fd8c (patch) | |
| tree | fa43aec0715a6d82ed8160c0be716389c6cea914 | |
| parent | d3560e0af4d27e423a2acd7c6a40a47305255a34 (diff) | |
| download | emacs-93c3363523be0df353ddd9653494bec8dc57fd8c.tar.gz emacs-93c3363523be0df353ddd9653494bec8dc57fd8c.zip | |
Fix epg-related compilation warnings in mml-sec
* lisp/gnus/mml-sec.el: Fix compilation warnings from the epg
library.
| -rw-r--r-- | lisp/gnus/mml-sec.el | 24 |
1 files changed, 13 insertions, 11 deletions
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 @@ | |||
| 27 | 27 | ||
| 28 | (require 'gnus-util) | 28 | (require 'gnus-util) |
| 29 | (require 'epg) | 29 | (require 'epg) |
| 30 | (require 'epa) | ||
| 31 | (require 'password-cache) | ||
| 32 | (require 'mm-encode) | ||
| 30 | 33 | ||
| 31 | (autoload 'mail-strip-quoted-names "mail-utils") | 34 | (autoload 'mail-strip-quoted-names "mail-utils") |
| 32 | (autoload 'mml2015-sign "mml2015") | 35 | (autoload 'mml2015-sign "mml2015") |
| @@ -43,6 +46,8 @@ | |||
| 43 | (autoload 'mml-smime-verify "mml-smime") | 46 | (autoload 'mml-smime-verify "mml-smime") |
| 44 | (autoload 'mml-smime-verify-test "mml-smime") | 47 | (autoload 'mml-smime-verify-test "mml-smime") |
| 45 | (autoload 'epa--select-keys "epa") | 48 | (autoload 'epa--select-keys "epa") |
| 49 | (autoload 'message-options-get "message") | ||
| 50 | (autoload 'message-options-set "message") | ||
| 46 | 51 | ||
| 47 | (defvar mml-sign-alist | 52 | (defvar mml-sign-alist |
| 48 | '(("smime" mml-smime-sign-buffer mml-smime-sign-query) | 53 | '(("smime" mml-smime-sign-buffer mml-smime-sign-query) |
| @@ -110,10 +115,7 @@ details." | |||
| 110 | :group 'message | 115 | :group 'message |
| 111 | :type 'boolean) | 116 | :type 'boolean) |
| 112 | 117 | ||
| 113 | (defcustom mml-secure-cache-passphrase | 118 | (defcustom mml-secure-cache-passphrase password-cache |
| 114 | (if (boundp 'password-cache) | ||
| 115 | password-cache | ||
| 116 | t) | ||
| 117 | "If t, cache OpenPGP or S/MIME passphrases inside Emacs. | 119 | "If t, cache OpenPGP or S/MIME passphrases inside Emacs. |
| 118 | Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead. | 120 | Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead. |
| 119 | See Info node `(message) Security'." | 121 | See Info node `(message) Security'." |
| @@ -623,7 +625,7 @@ Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead." | |||
| 623 | The passphrase is read and cached." | 625 | The passphrase is read and cached." |
| 624 | ;; Based on mml2015-epg-passphrase-callback. | 626 | ;; Based on mml2015-epg-passphrase-callback. |
| 625 | (if (eq key-id 'SYM) | 627 | (if (eq key-id 'SYM) |
| 626 | (epg-passphrase-callback-function context key-id nil) | 628 | (epa-passphrase-callback-function context key-id nil) |
| 627 | (let* ((password-cache-key-id | 629 | (let* ((password-cache-key-id |
| 628 | (if (eq key-id 'PIN) | 630 | (if (eq key-id 'PIN) |
| 629 | "PIN" | 631 | "PIN" |
| @@ -907,10 +909,10 @@ If no one is selected, symmetric encryption will be performed. " | |||
| 907 | cipher signers) | 909 | cipher signers) |
| 908 | (when sign | 910 | (when sign |
| 909 | (setq signers (mml-secure-signers context signer-names)) | 911 | (setq signers (mml-secure-signers context signer-names)) |
| 910 | (epg-context-set-signers context signers)) | 912 | (setf (epg-context-signers context) signers)) |
| 911 | (when (eq 'OpenPGP protocol) | 913 | (when (eq 'OpenPGP protocol) |
| 912 | (epg-context-set-armor context t) | 914 | (setf (epg-context-armor context) t) |
| 913 | (epg-context-set-textmode context t)) | 915 | (setf (epg-context-textmode context) t)) |
| 914 | (when (mml-secure-cache-passphrase-p protocol) | 916 | (when (mml-secure-cache-passphrase-p protocol) |
| 915 | (epg-context-set-passphrase-callback | 917 | (epg-context-set-passphrase-callback |
| 916 | context | 918 | context |
| @@ -935,9 +937,9 @@ If no one is selected, symmetric encryption will be performed. " | |||
| 935 | (signers (mml-secure-signers context signer-names)) | 937 | (signers (mml-secure-signers context signer-names)) |
| 936 | signature micalg) | 938 | signature micalg) |
| 937 | (when (eq 'OpenPGP protocol) | 939 | (when (eq 'OpenPGP protocol) |
| 938 | (epg-context-set-armor context t) | 940 | (setf (epg-context-armor context) t) |
| 939 | (epg-context-set-textmode context t)) | 941 | (setf (epg-context-textmode context) t)) |
| 940 | (epg-context-set-signers context signers) | 942 | (setf (epg-context-signers context) signers) |
| 941 | (when (mml-secure-cache-passphrase-p protocol) | 943 | (when (mml-secure-cache-passphrase-p protocol) |
| 942 | (epg-context-set-passphrase-callback | 944 | (epg-context-set-passphrase-callback |
| 943 | context | 945 | context |