Function: mml-secure-sender-sign-query
mml-secure-sender-sign-query is a byte-compiled function defined in
mml-sec.el.gz.
Signature
(mml-secure-sender-sign-query PROTOCOL SENDER)
Documentation
Query whether to use SENDER to sign when using PROTOCOL.
PROTOCOL will be OpenPGP or CMS (smime).
This can also save the resulting value of
mml-secure-smime-sign-with-sender or
mml-secure-openpgp-sign-with-sender via Customize.
Returns non-nil if the user has chosen to use SENDER.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/mml-sec.el.gz
(defun mml-secure-sender-sign-query (protocol sender)
"Query whether to use SENDER to sign when using PROTOCOL.
PROTOCOL will be `OpenPGP' or `CMS' (smime).
This can also save the resulting value of
`mml-secure-smime-sign-with-sender' or
`mml-secure-openpgp-sign-with-sender' via Customize.
Returns non-nil if the user has chosen to use SENDER."
(let ((buffer (get-buffer-create "*MML sender signing options*"))
(options '((?a "always" "Sign using this sender now and sign with message sender in future.")
(?s "session only" "Sign using this sender now, and sign with message sender for this session only.")
(?n "no" "Do not sign this message (and error out)")))
answer done val)
(save-window-excursion
(pop-to-buffer buffer)
(erase-buffer)
(insert (format "No %s signing key was found for this message.\nThe sender of this message is \"%s\".\nWould you like to attempt looking up a signing key based on it?"
(if (eq protocol 'OpenPGP)
"openpgp" "smime")
sender))
(while (not done)
(setq answer (read-multiple-choice "Sign this message using the sender?" options))
(cl-case (car answer)
(?a
(if (eq protocol 'OpenPGP)
(progn
(setq mml-secure-openpgp-sign-with-sender t)
(customize-save-variable
'mml-secure-openpgp-sign-with-sender t))
(setq mml-secure-smime-sign-with-sender t)
(customize-save-variable 'mml-secure-smime-sign-with-sender t))
(setq done t
val t))
(?s
(if (eq protocol 'OpenPGP)
(setq mml-secure-openpgp-sign-with-sender t)
(setq mml-secure-smime-sign-with-sender t))
(setq done t
val t))
(?n
(setq done t)))))
val))