summaryrefslogtreecommitdiff
path: root/lisp/epg-config.el
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2016-02-21 07:11:04 +0900
committerDaiki Ueno <ueno@gnu.org>2016-02-21 07:55:22 +0900
commit74ec92da9e0430728ac9496d3b1e50f0bb5dae3a (patch)
treef690ccf3c32e8f720ccc6747100b2d7c1fcc0075 /lisp/epg-config.el
parentea0b604412d6b33353839640f7d5e5e0b62a45ad (diff)
downloademacs-74ec92da9e0430728ac9496d3b1e50f0bb5dae3a.tar.gz
Prefer customized value for GnuPG executable
* lisp/epg-config.el (epg-configuration-find): Don't check GPG configuration if it is already set with custom. (Bug#22747)
Diffstat (limited to 'lisp/epg-config.el')
-rw-r--r--lisp/epg-config.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/epg-config.el b/lisp/epg-config.el
index 17364563e8b..1d7706647db 100644
--- a/lisp/epg-config.el
+++ b/lisp/epg-config.el
@@ -114,16 +114,15 @@ entry until the version requirement is met."
(cl-destructuring-bind (symbol constructor . alist)
(cdr entry)
(or (and (not force) (alist-get protocol epg--configurations))
- (let ((executable (get symbol 'saved-value)))
- (if executable
- (ignore-errors
- (let ((configuration (funcall constructor executable)))
- (epg-check-configuration configuration)
- (push (cons protocol configuration) epg--configurations)
- configuration))
- (catch 'found
- (dolist (program-version alist)
- (setq executable (executable-find (car program-version)))
+ ;; If the executable value is already set with M-x
+ ;; customize, use it without checking.
+ (if (get symbol 'saved-value)
+ (let ((configuration (funcall constructor (symbol-value symbol))))
+ (push (cons protocol configuration) epg--configurations)
+ configuration)
+ (catch 'found
+ (dolist (program-version alist)
+ (let ((executable (executable-find (car program-version))))
(when executable
(let ((configuration
(funcall constructor executable)))