aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert1993-09-27 04:36:31 +0000
committerPaul Eggert1993-09-27 04:36:31 +0000
commitdeb9ebc6cb61c5f9e99da38810e16b911cd3917e (patch)
treeea2f53d2ebec11d287f3d8dc4424e86a55f53b5c
parent2cc27dd3d24573bbd673768c2182a73be599b313 (diff)
downloademacs-deb9ebc6cb61c5f9e99da38810e16b911cd3917e.tar.gz
emacs-deb9ebc6cb61c5f9e99da38810e16b911cd3917e.zip
(vc-find-binary): Fix bug; it always claimed success.
-rw-r--r--lisp/vc.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 7795850016c..060d64794eb 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -164,16 +164,19 @@ is sensitive to blank lines.")
164(defun vc-find-binary (name) 164(defun vc-find-binary (name)
165 "Look for a command anywhere on the subprocess-command search path." 165 "Look for a command anywhere on the subprocess-command search path."
166 (or (cdr (assoc name vc-binary-assoc)) 166 (or (cdr (assoc name vc-binary-assoc))
167 (let ((full nil)) 167 (catch 'found
168 (catch 'found 168 (mapcar
169 (mapcar 169 (function
170 (function (lambda (s) 170 (lambda (s)
171 (if (and s (file-exists-p (setq full (concat s "/" name)))) 171 (if s
172 (throw 'found nil)))) 172 (let ((full (concat s "/" name)))
173 exec-path)) 173 (if (file-executable-p full)
174 (if full 174 (progn
175 (setq vc-binary-assoc (cons (cons name full) vc-binary-assoc))) 175 (setq vc-binary-assoc
176 full))) 176 (cons (cons name full) vc-binary-assoc))
177 (throw 'found full)))))))
178 exec-path)
179 nil)))
177 180
178(defun vc-do-command (okstatus command file &rest flags) 181(defun vc-do-command (okstatus command file &rest flags)
179 "Execute a version-control command, notifying user and checking for errors. 182 "Execute a version-control command, notifying user and checking for errors.