Mercurial > emacs
changeset 4791:3544f3a41ae6
(vc-find-binary): Fix bug; it always claimed success.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Mon, 27 Sep 1993 04:36:31 +0000 |
parents | b110036d90b0 |
children | c6f0e1fb834e |
files | lisp/vc.el |
diffstat | 1 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/vc.el Mon Sep 27 02:19:46 1993 +0000 +++ b/lisp/vc.el Mon Sep 27 04:36:31 1993 +0000 @@ -164,16 +164,19 @@ (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.