search ".exe" also.

This commit is contained in:
Kazu Yamamoto 2010-03-30 12:05:35 +09:00
parent 9d44d13ba1
commit 4aef34e352
1 changed files with 6 additions and 4 deletions

View File

@ -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))