aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorEli Zaretskii2012-10-20 18:17:25 +0200
committerEli Zaretskii2012-10-20 18:17:25 +0200
commit6d03e7beda333663080a64af902231342fd941cf (patch)
treebd4521483ad70701e3dbf2c32e2910947bad5b53 /lisp/eshell
parent87c6b4e6bd7e023bd57c709bb6af59bca27bf4f6 (diff)
parent83c85d8e2e6c1e1cb309f554555e1aebc1dcb44f (diff)
downloademacs-6d03e7beda333663080a64af902231342fd941cf.tar.gz
emacs-6d03e7beda333663080a64af902231342fd941cf.zip
Merge from trunk.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-cmd.el28
1 files changed, 15 insertions, 13 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 5a10721387b..e6e89d83b7c 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -484,20 +484,22 @@ implemented via rewriting, rather than as a function."
484 (let ((body (car (last terms)))) 484 (let ((body (car (last terms))))
485 (setcdr (last terms 2) nil) 485 (setcdr (last terms 2) nil)
486 `(let ((for-items 486 `(let ((for-items
487 (append 487 (copy-tree
488 ,@(mapcar 488 (append
489 (lambda (elem) 489 ,@(mapcar
490 (if (listp elem) 490 (lambda (elem)
491 elem 491 (if (listp elem)
492 `(list ,elem))) 492 elem
493 (cdr (cddr terms))))) 493 `(list ,elem)))
494 (eshell-command-body '(nil)) 494 (cdr (cddr terms))))))
495 (eshell-command-body '(nil))
495 (eshell-test-body '(nil))) 496 (eshell-test-body '(nil)))
496 (while (consp for-items) 497 (while (car for-items)
497 (let ((,(intern (cadr terms)) (car for-items))) 498 (let ((,(intern (cadr terms)) (car for-items)))
498 (eshell-protect 499 (eshell-protect
499 ,(eshell-invokify-arg body t))) 500 ,(eshell-invokify-arg body t)))
500 (setq for-items (cdr for-items))) 501 (setcar for-items (cadr for-items))
502 (setcdr for-items (cddr for-items)))
501 (eshell-close-handles 503 (eshell-close-handles
502 eshell-last-command-status 504 eshell-last-command-status
503 (list 'quote eshell-last-command-result)))))) 505 (list 'quote eshell-last-command-result))))))