]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-find-binary): Fix bug; it always claimed success.
authorPaul Eggert <eggert@twinsun.com>
Mon, 27 Sep 1993 04:36:31 +0000 (04:36 +0000)
committerPaul Eggert <eggert@twinsun.com>
Mon, 27 Sep 1993 04:36:31 +0000 (04:36 +0000)
lisp/vc.el

index 7795850016ca155a04ec9308c320558443ade4ea..060d64794eb1634d274fd3549f4d253aef0d9aa4 100644 (file)
@@ -164,16 +164,19 @@ is sensitive to blank lines.")
 (defun vc-find-binary (name)
   "Look for a command anywhere on the subprocess-command search path."
   (or (cdr (assoc name vc-binary-assoc))
-      (let ((full nil))
-       (catch 'found
-         (mapcar
-          (function (lambda (s)
-             (if (and s (file-exists-p (setq full (concat s "/" name))))
-                 (throw 'found nil))))
-         exec-path))
-       (if full
-           (setq vc-binary-assoc (cons (cons name full) vc-binary-assoc)))
-       full)))
+      (catch 'found
+       (mapcar
+        (function 
+         (lambda (s)
+           (if s
+               (let ((full (concat s "/" name)))
+                 (if (file-executable-p full)
+                     (progn
+                       (setq vc-binary-assoc
+                             (cons (cons name full) vc-binary-assoc))
+                       (throw 'found full)))))))
+        exec-path)
+       nil)))
 
 (defun vc-do-command (okstatus command file &rest flags)
   "Execute a version-control command, notifying user and checking for errors.