# HG changeset patch # User Eli Zaretskii # Date 898439347 0 # Node ID 442d61eaab83e897dad07f8516e38ea045db0939 # Parent 6eae236a4f016325b66ad085c8ec9956433468bf (vc-binary-suffixes): New variable. (vc-find-binary): Append every suffix from vc-binary-suffixes when looking for executable files. diff -r 6eae236a4f01 -r 442d61eaab83 lisp/vc.el --- a/lisp/vc.el Sat Jun 20 22:28:28 1998 +0000 +++ b/lisp/vc.el Sun Jun 21 14:29:07 1998 +0000 @@ -5,7 +5,7 @@ ;; Author: Eric S. Raymond ;; Maintainer: Andre Spiegel -;; $Id: vc.el,v 1.231 1998/06/12 11:13:37 spiegel Exp rms $ +;; $Id: vc.el,v 1.232 1998/06/16 16:38:47 rms Exp eliz $ ;; This file is part of GNU Emacs. @@ -506,7 +506,10 @@ (error "File %s is not under version control" (buffer-file-name)))))) (defvar vc-binary-assoc nil) - +(defvar vc-binary-suffixes + (if (memq system-type '(ms-dos windows-nt)) + '(".exe" ".com" ".bat" ".cmd" ".btm" "") + '(""))) (defun vc-find-binary (name) "Look for a command anywhere on the subprocess-command search path." (or (cdr (assoc name vc-binary-assoc)) @@ -515,13 +518,18 @@ (function (lambda (s) (if s - (let ((full (concat s "/" name))) - (if (and (file-executable-p full) - (not (file-directory-p full))) - (progn - (setq vc-binary-assoc - (cons (cons name full) vc-binary-assoc)) - (throw 'found full))))))) + (let ((full (concat s "/" name)) + (suffixes vc-binary-suffixes) + candidate) + (while suffixes + (setq candidate (concat full (car suffixes))) + (if (and (file-executable-p candidate) + (not (file-directory-p candidate))) + (progn + (setq vc-binary-assoc + (cons (cons name candidate) vc-binary-assoc)) + (throw 'found candidate)) + (setq suffixes (cdr suffixes)))))))) exec-path) nil)))