mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG is not fully...
authorDaiki Ueno <ueno@unixuser.org>
Thu, 30 Jun 2011 22:15:13 +0000 (22:15 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 30 Jun 2011 22:15:13 +0000 (22:15 +0000)
lisp/ChangeLog
lisp/mml2015.el

index 39494a4..af728c9 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-30  Daiki Ueno  <ueno@unixuser.org>
+
+       * mml2015.el (mml2015-use): Don't try to load PGG on Emacs 24, when EPG
+       is not fully working.
+
 2011-06-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * dgnushack.el: Autoload sha1 on XEmacs.
index df106bb..d7070ef 100644 (file)
                           '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)