diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-08-26 08:02:31 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-08-26 08:02:31 +0200 |
commit | 42ba6200af10c00c72ac13912d6fb42a7af88058 (patch) | |
tree | dfc71ef74329d781552d72ac69dfba8c52fc5930 | |
parent | f5fa0c9062d065dc61fdff92b56b9f5da439a83d (diff) | |
download | emacs-42ba6200af10c00c72ac13912d6fb42a7af88058.tar.gz |
Allow finding gpg2 binaries when gpg2 has an "unknown" version string
* lisp/epg-config.el (epg-find-configuration): Allow finding a
usable configuration even if the version string looks like "gpg
(GnuPG) 2.2.15-unknown" (bug#35629).
-rw-r--r-- | lisp/epg-config.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/epg-config.el b/lisp/epg-config.el index 54328290c8f..4a9cc7744cb 100644 --- a/lisp/epg-config.el +++ b/lisp/epg-config.el @@ -148,7 +148,11 @@ Otherwise, it tries the programs listed in the entry until the version requirement is met." (unless program-alist (setq program-alist epg-config--program-alist)) - (let ((entry (assq protocol program-alist))) + (let ((entry (assq protocol program-alist)) + ;; In many gnupg distributions (especially on Windows), the + ;; version string is "gpg (GnuPG) 2.2.15-unknown" or the like. + (version-regexp-alist (cons '("^[-._+ ]?unknown$" . -4) + version-regexp-alist))) (unless entry (error "Unknown protocol %S" protocol)) (cl-destructuring-bind (symbol . alist) |