]> 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 0451c379ac206d1eae8d8f294ee946f00ed6e5e1..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.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
 ;;; Code:
 
 (eval-when-compile
+  (require 'cl)
   (require 'eshell))
 (require 'esh-util)
 
-(defgroup eshell-cmpl nil
+;;;###autoload
+(eshell-defgroup eshell-cmpl nil
   "This module provides a programmable completion function bound to
 the TAB key, which allows for completing command names, file names,
 variable names, arguments, etc."
@@ -400,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 ())
@@ -449,5 +451,9 @@ to writing a completion function."
 
 (provide 'em-cmpl)
 
+;; Local Variables:
+;; generated-autoload-file: "esh-groups.el"
+;; End:
+
 ;; arch-tag: 0e914699-673a-45f8-8cbf-82e1dbc571bc
 ;;; em-cmpl.el ends here