]> code.delx.au - gnu-emacs/commit
Make GnuPG version check robuster
authorDaiki Ueno <ueno@gnu.org>
Wed, 17 Feb 2016 07:32:25 +0000 (16:32 +0900)
committerDaiki Ueno <ueno@gnu.org>
Wed, 17 Feb 2016 07:47:24 +0000 (16:47 +0900)
commite80c2a7b47d161f00aac096b9d58a18879a122e8
tree982974a0196587628a0891ffb19d66339c650fad
parent15a946479c96fdce693c13acfe41a66266ffcadb
Make GnuPG version check robuster

We changed the default gpg program to "gpg2" from "gpg" in the commit
f93d669a16bd3cb3f43f0c8cfd22fe18b627a6a1.  However, there are two
maintained branches (2.0 and 2.1) and Emacs doesn't work well with 2.0
series.  Check the actual version of "gpg2" at run time, and properly
divert to "gpg" if necessary.
* lisp/epg-config.el: Require 'cl-lib for `cl-destructuring-bind'.
(epg-config--program-alist): New variable.
(epg--configurations): New variable.
(epg-configuration-find): New function.
(epg-config--make-gpg-configuration): New function.
(epg-config--make-gpgsm-configuration): New function.
(epg-configuration): Mark as obsolete.
* lisp/epg.el (epg-context): Use `epg-configuration-find'.
lisp/epg-config.el
lisp/epg.el