]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-cmpl.el
* lisp/eshell/esh-io.el (eshell-get-target): Better detection of read-only file ...
[gnu-emacs] / lisp / eshell / em-cmpl.el
index a5dfe1424c9e2280c5394c951c59df63246de14d..b0aad0f149915d5ef41142fae53670a7f6552999 100644 (file)
@@ -1,7 +1,7 @@
 ;;; em-cmpl.el --- completion using the TAB key
 
 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008  Free Software Foundation, Inc.
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -71,6 +71,7 @@
 ;;; Code:
 
 (eval-when-compile
+  (require 'cl)
   (require 'eshell))
 (require 'esh-util)
 
@@ -401,7 +402,7 @@ to writing a completion function."
          (setq filename (substring filename 1)
                pcomplete-stub filename
                glob-name t))
-      (let* ((paths (split-string (getenv "PATH") path-separator))
+      (let* ((paths (eshell-parse-colon-path eshell-path-env))
             (cwd (file-name-as-directory
                   (expand-file-name default-directory)))
             (path "") (comps-in-path ())