aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno2016-02-21 07:11:04 +0900
committerDaiki Ueno2016-02-21 07:55:22 +0900
commit74ec92da9e0430728ac9496d3b1e50f0bb5dae3a (patch)
treef690ccf3c32e8f720ccc6747100b2d7c1fcc0075
parentea0b604412d6b33353839640f7d5e5e0b62a45ad (diff)
downloademacs-74ec92da9e0430728ac9496d3b1e50f0bb5dae3a.tar.gz
emacs-74ec92da9e0430728ac9496d3b1e50f0bb5dae3a.zip
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)
-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."
114 (cl-destructuring-bind (symbol constructor . alist) 114 (cl-destructuring-bind (symbol constructor . alist)
115 (cdr entry) 115 (cdr entry)
116 (or (and (not force) (alist-get protocol epg--configurations)) 116 (or (and (not force) (alist-get protocol epg--configurations))
117 (let ((executable (get symbol 'saved-value))) 117 ;; If the executable value is already set with M-x
118 (if executable 118 ;; customize, use it without checking.
119 (ignore-errors 119 (if (get symbol 'saved-value)
120 (let ((configuration (funcall constructor executable))) 120 (let ((configuration (funcall constructor (symbol-value symbol))))
121 (epg-check-configuration configuration) 121 (push (cons protocol configuration) epg--configurations)
122 (push (cons protocol configuration) epg--configurations) 122 configuration)
123 configuration)) 123 (catch 'found
124 (catch 'found 124 (dolist (program-version alist)
125 (dolist (program-version alist) 125 (let ((executable (executable-find (car program-version))))
126 (setq executable (executable-find (car program-version)))
127 (when executable 126 (when executable
128 (let ((configuration 127 (let ((configuration
129 (funcall constructor executable))) 128 (funcall constructor executable)))