summaryrefslogtreecommitdiff
path: root/lisp/gnus/mml2015.el
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@unixuser.org>2011-07-01 05:54:35 +0900
committerDaiki Ueno <ueno@unixuser.org>2011-07-01 05:54:35 +0900
commit9ccd6e90d61cc3e995b1c37d3e6981fa511f6668 (patch)
tree1569f30cd5169e22420b8e2b42dc0f3bc4125e7d /lisp/gnus/mml2015.el
parentb14c0c5545592e86b968405c794c10bc55f95124 (diff)
downloademacs-9ccd6e90d61cc3e995b1c37d3e6981fa511f6668.tar.gz
Prevent Gnus from loading PGG.
* mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG is not fully working.
Diffstat (limited to 'lisp/gnus/mml2015.el')
-rw-r--r--lisp/gnus/mml2015.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index df106bb6de8..d7070effde5 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -55,9 +55,15 @@
'epg)
(error))
(progn
- (ignore-errors (require 'pgg))
- (and (fboundp 'pgg-sign-region)
- 'pgg))
+ (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-p "/obsolete/[^/]*\\'"
+ abs-file)))
+ (ignore-errors (require 'pgg))
+ (and (fboundp 'pgg-sign-region)
+ 'pgg))))
(progn (ignore-errors
(load "mc-toplev"))
(and (fboundp 'mc-encrypt-generic)