[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109458: * lisp/eshell/esh-ext.el (es
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109458: * lisp/eshell/esh-ext.el (eshell/addpath): Use mapconcat. |
Date: |
Mon, 06 Aug 2012 00:10:27 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109458
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2012-08-06 00:10:27 -0700
message:
* lisp/eshell/esh-ext.el (eshell/addpath): Use mapconcat.
modified:
lisp/ChangeLog
lisp/eshell/esh-ext.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-08-06 05:33:39 +0000
+++ b/lisp/ChangeLog 2012-08-06 07:10:27 +0000
@@ -21,7 +21,7 @@
2012-08-06 Glenn Morris <address@hidden>
- * eshell/esh-ext.el (eshell/addpath): Use dolist.
+ * eshell/esh-ext.el (eshell/addpath): Use dolist and mapconcat.
Do less getting and setting of environment variables.
2012-08-05 Chong Yidong <address@hidden>
=== modified file 'lisp/eshell/esh-ext.el'
--- a/lisp/eshell/esh-ext.el 2012-08-06 01:23:37 +0000
+++ b/lisp/eshell/esh-ext.el 2012-08-06 07:10:27 +0000
@@ -226,12 +226,12 @@
Adds the given PATH to $PATH.")
(if args
(progn
- (setq eshell-path-env (getenv "PATH"))
- (dolist (dir (if prepend (nreverse args) args))
- (setq eshell-path-env
- (if prepend
- (concat dir path-separator eshell-path-env)
- (concat eshell-path-env path-separator dir))))
+ (setq eshell-path-env (getenv "PATH")
+ args (mapconcat 'identity args path-separator)
+ eshell-path-env
+ (if prepend
+ (concat args path-separator eshell-path-env)
+ (concat eshell-path-env path-separator args)))
(setenv "PATH" eshell-path-env))
(dolist (dir (parse-colon-path (getenv "PATH")))
(eshell-printn dir)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109458: * lisp/eshell/esh-ext.el (eshell/addpath): Use mapconcat.,
Glenn Morris <=