diff options
| author | Glenn Morris | 2012-08-06 00:10:27 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-08-06 00:10:27 -0700 |
| commit | e296d94b3369d05eeeeffde728a8bf5de885c720 (patch) | |
| tree | b5cddc2d9495307d823e2f08542d7ac0bfdb43d5 | |
| parent | 90749b537a83a3ba623e6f6163256130575fac2f (diff) | |
| download | emacs-e296d94b3369d05eeeeffde728a8bf5de885c720.tar.gz emacs-e296d94b3369d05eeeeffde728a8bf5de885c720.zip | |
* lisp/eshell/esh-ext.el (eshell/addpath): Use mapconcat.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-ext.el | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8867ec557e5..8088a51f591 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 2012-08-06 Glenn Morris <rgm@gnu.org> | 22 | 2012-08-06 Glenn Morris <rgm@gnu.org> |
| 23 | 23 | ||
| 24 | * eshell/esh-ext.el (eshell/addpath): Use dolist. | 24 | * eshell/esh-ext.el (eshell/addpath): Use dolist and mapconcat. |
| 25 | Do less getting and setting of environment variables. | 25 | Do less getting and setting of environment variables. |
| 26 | 26 | ||
| 27 | 2012-08-05 Chong Yidong <cyd@gnu.org> | 27 | 2012-08-05 Chong Yidong <cyd@gnu.org> |
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index c0add0443cb..52df1587d5f 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el | |||
| @@ -226,12 +226,12 @@ causing the user to wonder if anything's really going on..." | |||
| 226 | Adds the given PATH to $PATH.") | 226 | Adds the given PATH to $PATH.") |
| 227 | (if args | 227 | (if args |
| 228 | (progn | 228 | (progn |
| 229 | (setq eshell-path-env (getenv "PATH")) | 229 | (setq eshell-path-env (getenv "PATH") |
| 230 | (dolist (dir (if prepend (nreverse args) args)) | 230 | args (mapconcat 'identity args path-separator) |
| 231 | (setq eshell-path-env | 231 | eshell-path-env |
| 232 | (if prepend | 232 | (if prepend |
| 233 | (concat dir path-separator eshell-path-env) | 233 | (concat args path-separator eshell-path-env) |
| 234 | (concat eshell-path-env path-separator dir)))) | 234 | (concat eshell-path-env path-separator args))) |
| 235 | (setenv "PATH" eshell-path-env)) | 235 | (setenv "PATH" eshell-path-env)) |
| 236 | (dolist (dir (parse-colon-path (getenv "PATH"))) | 236 | (dolist (dir (parse-colon-path (getenv "PATH"))) |
| 237 | (eshell-printn dir))))) | 237 | (eshell-printn dir))))) |