From 9ccd6e90d61cc3e995b1c37d3e6981fa511f6668 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 1 Jul 2011 05:54:35 +0900 Subject: [PATCH] Prevent Gnus from loading PGG. * mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG is not fully working. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/mml2015.el | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 8133964dd41..e66ae09d391 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-06-30 Daiki Ueno + + * mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG + is not fully working. + 2011-06-30 Andrew Cohen * gnus-art.el (gnus-request-article-this-buffer): Use existing function 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) -- 2.11.4.GIT