Make eshell-for obsolete (replaced by dolist)
[bpt/emacs.git] / lisp / eshell / esh-var.el
index f76d1de..8fb0896 100644 (file)
@@ -1,7 +1,6 @@
 ;;; esh-var.el --- handling of variables
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1999-2011  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -352,8 +351,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'."
    '((?h "help" nil nil "show this usage screen")
      :external "env"
      :usage "<no arguments>")
-   (eshell-for setting (sort (eshell-environment-variables)
-                            'string-lessp)
+   (dolist (setting (sort (eshell-environment-variables) 'string-lessp))
      (eshell-buffered-print setting "\n"))
    (eshell-flush)))
 
@@ -375,7 +373,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'."
 This involves setting any variable aliases which affect the
 environment, as specified in `eshell-variable-aliases-list'."
   (let ((process-environment (eshell-copy-environment)))
-    (eshell-for var-alias eshell-variable-aliases-list
+    (dolist (var-alias eshell-variable-aliases-list)
       (if (nth 2 var-alias)
          (setenv (car var-alias)
                  (eshell-stringify
@@ -624,7 +622,7 @@ For example, to retrieve the second element of a user's record in
   "Generate list of applicable variables."
   (let ((argname pcomplete-stub)
        completions)
-    (eshell-for alias eshell-variable-aliases-list
+    (dolist (alias eshell-variable-aliases-list)
       (if (string-match (concat "^" argname) (car alias))
          (setq completions (cons (car alias) completions))))
     (sort
@@ -653,5 +651,4 @@ For example, to retrieve the second element of a user's record in
       (setq pcomplete-stub (substring arg pos))
       (throw 'pcomplete-completions (pcomplete-entries)))))
 
-;; arch-tag: 393654fe-bdad-4f27-9a10-b1472ded14cf
 ;;; esh-var.el ends here