[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109454: Tweak previous esh-ext.el ch
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109454: Tweak previous esh-ext.el change |
Date: |
Sun, 05 Aug 2012 18:23:37 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109454
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2012-08-05 18:23:37 -0700
message:
Tweak previous esh-ext.el change
* lisp/eshell/esh-ext.el (eshell/addpath): Use dolist.
Do less getting and setting of environment variables.
modified:
lisp/ChangeLog
lisp/eshell/esh-ext.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-08-05 14:22:05 +0000
+++ b/lisp/ChangeLog 2012-08-06 01:23:37 +0000
@@ -1,3 +1,8 @@
+2012-08-06 Glenn Morris <address@hidden>
+
+ * eshell/esh-ext.el (eshell/addpath): Use dolist.
+ Do less getting and setting of environment variables.
+
2012-08-05 Chong Yidong <address@hidden>
* proced.el (proced): Add substitution string to docstring to
=== modified file 'lisp/eshell/esh-ext.el'
--- a/lisp/eshell/esh-ext.el 2012-08-05 05:24:50 +0000
+++ b/lisp/eshell/esh-ext.el 2012-08-06 01:23:37 +0000
@@ -226,21 +226,15 @@
Adds the given PATH to $PATH.")
(if args
(progn
- (if prepend
- (setq args (nreverse args)))
- (while args
- (setenv "PATH"
- (if prepend
- (concat (car args) path-separator
- (getenv "PATH"))
- (concat (getenv "PATH") path-separator
- (car args))))
- (setq args (cdr args)))
- (setq eshell-path-env (getenv "PATH")))
- (let ((paths (parse-colon-path (getenv "PATH"))))
- (while paths
- (eshell-printn (car paths))
- (setq paths (cdr paths)))))))
+ (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))))
+ (setenv "PATH" eshell-path-env))
+ (dolist (dir (parse-colon-path (getenv "PATH")))
+ (eshell-printn dir)))))
(put 'eshell/addpath 'eshell-no-numeric-conversions t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109454: Tweak previous esh-ext.el change,
Glenn Morris <=