From 4aef34e3521194471e7f293ebc5667dc8e4420b9 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 30 Mar 2010 12:05:35 +0900 Subject: [PATCH] search ".exe" also. --- elisp/ghc-func.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/elisp/ghc-func.el b/elisp/ghc-func.el index 8f7639c..69198b0 100644 --- a/elisp/ghc-func.el +++ b/elisp/ghc-func.el @@ -17,10 +17,12 @@ (defun ghc-which (cmd) (catch 'loop - (dolist (dir exec-path) - (let ((path (expand-file-name cmd dir))) - (if (file-exists-p path) - (throw 'loop path)))))) + (dolist (suffix '("" ".exe")) + (let ((cmds (concat cmd suffix))) + (dolist (dir exec-path) + (let ((path (expand-file-name cmds dir))) + (if (file-exists-p path) + (throw 'loop path)))))))) (defun ghc-uniq-lol (lol) (let ((hash (make-hash-table :test 'equal))