[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 06cb835: Improve an error about the message signer

From: Karl Fogel
Subject: master 06cb835: Improve an error about the message signer
Date: Sat, 9 Nov 2019 15:31:11 -0500 (EST)

branch: master
commit 06cb8350c69d96c686f17fdb2d1f9260cd16a0df
Author: Karl Fogel <address@hidden>
Commit: Karl Fogel <address@hidden>

    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.
 lisp/gnus/mml-sec.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index c7a2d46..a1f5b63 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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]