diff options
author | Karl Fogel <kfogel@red-bean.com> | 2019-11-04 14:39:14 -0600 |
---|---|---|
committer | Karl Fogel <kfogel@red-bean.com> | 2019-11-09 15:30:09 -0500 |
commit | 06cb8350c69d96c686f17fdb2d1f9260cd16a0df (patch) | |
tree | d3662919411c35fce971f9fc93f5e2d62f66bfc9 /lisp/gnus/mml-sec.el | |
parent | a67b51e92bb36b32f88dca01c3cd3da02b3dfb99 (diff) | |
download | emacs-06cb8350c69d96c686f17fdb2d1f9260cd16a0df.tar.gz emacs-06cb8350c69d96c686f17fdb2d1f9260cd16a0df.tar.bz2 emacs-06cb8350c69d96c686f17fdb2d1f9260cd16a0df.zip |
Improve an error about the message signer
* lisp/gnus/mml-sec.el (mml-secure-epg-sign): Don't suggest setting
`mml-secure-smime-sign-with-sender' if it's already non-nil.
Diffstat (limited to 'lisp/gnus/mml-sec.el')
-rw-r--r-- | lisp/gnus/mml-sec.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index c7a2d4664e8..a1f5b6386b2 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -945,7 +945,15 @@ If no one is selected, symmetric encryption will be performed. " (signers (mml-secure-signers context signer-names)) signature micalg) (unless signers - (error "Couldn't find any signer names. Perhaps `mml-secure-smime-sign-with-sender' should be set?")) + (let ((maybe-msg + (if mml-secure-smime-sign-with-sender + "." + "; try setting `mml-secure-smime-sign-with-sender'."))) + ;; If `mml-secure-smime-sign-with-sender' is already non-nil + ;; then there's no point advising the user to examine it. If + ;; there are any other variables worth examining, please + ;; improve this error message by having it mention them. + (error "Couldn't find any signer names%s" maybe-msg))) (when (eq 'OpenPGP protocol) (setf (epg-context-armor context) t) (setf (epg-context-textmode context) t) |