* lisp/gnus/gnus-art.el (gnus-treat-ansi-sequences): Simplify default.
* lisp/gnus/mml-smime.el (epg): Simply require it.
(mml-smime-use): Simplify the default. Doc fix.
* lisp/gnus/mml2015.el (epg-config): Require it.
(mml2015-use): Simplify the default.
* lisp/gnus/smime.el (password-cache): Simply require it.
(password-read-and-add): Remove declaration.
:type gnus-article-treat-custom)
(put 'gnus-treat-overstrike 'highlight t)
-(defcustom gnus-treat-ansi-sequences (if (locate-library "ansi-color") t)
+(defcustom gnus-treat-ansi-sequences t
"Treat ANSI SGR control sequences.
Valid values are nil, t, `head', `first', `last', an integer or a
predicate. See Info node `(gnus)Customizing Articles'."
(autoload 'message-narrow-to-headers "message")
(autoload 'message-fetch-field "message")
-;; Prefer epg over openssl if it is available as epg uses GnuPG's gpgsm,
+;; Prefer epg over openssl as epg uses GnuPG's gpgsm,
;; which features full-fledged certificate management, while openssl requires
;; major manual efforts for certificate revocation and expiry and has bugs
;; as documented under man smime(1).
-(ignore-errors (require 'epg))
+(require 'epg)
-(defcustom mml-smime-use (if (featurep 'epg) 'epg 'openssl)
+(defcustom mml-smime-use 'epg
"Whether to use OpenSSL or EasyPG (EPG) to handle S/MIME messages.
-Defaults to EPG if it's available.
-If you think about using OpenSSL, please read the BUGS section in the manual
-for the `smime' command coming with OpenSSL first. EasyPG is recommended."
+If you're thinking about using OpenSSL, please first read the BUGS section
+in the manual for the `smime' command that comes with OpenSSL.
+We recommend EasyPG."
:group 'mime-security
:type '(choice (const :tag "EPG" epg)
(const :tag "OpenSSL" openssl)))
(require 'mm-util)
(require 'mml)
(require 'mml-sec)
+(require 'epg-config)
(defvar mc-pgp-always-sign)
;; Maybe this should be in eg mml-sec.el (and have a different name).
;; Then mml1991 would not need to require mml2015, and mml1991-use
;; could be removed.
-(defvar mml2015-use (or
- (progn
- (ignore-errors (require 'epg-config))
- (and (fboundp 'epg-check-configuration)
- 'epg))
- (progn
- (let ((abs-file (locate-library "pgg")))
- ;; Don't load PGG if it is marked as obsolete
- ;; (Emacs 24).
- (when (and abs-file
- (not (string-match "/obsolete/[^/]*\\'"
- abs-file)))
- (ignore-errors (require 'pgg))
- (and (fboundp 'pgg-sign-region)
- 'pgg))))
- (progn (ignore-errors
- (load "mc-toplev"))
- (and (fboundp 'mc-encrypt-generic)
- (fboundp 'mc-sign-generic)
- (fboundp 'mc-cleanup-recipient-headers)
- 'mailcrypt)))
+(defvar mml2015-use 'epg
"The package used for PGP/MIME.
Valid packages include `epg', `pgg' and `mailcrypt'.")
(require 'dig)
-(if (locate-library "password-cache")
- (require 'password-cache)
- (require 'password))
+(require 'password-cache)
(eval-when-compile (require 'cl))
(defvar smime-details-buffer "*OpenSSL output*")
-;; Password dialog function
-(declare-function password-read-and-add "password-cache" (prompt &optional key))
-
(defun smime-ask-passphrase (&optional cache-key)
"Asks the passphrase to unlock the secret key.
If `cache-key' and `password-cache' is non-nil then cache the