Function: eshell-rewrite-while-command
eshell-rewrite-while-command is a byte-compiled function defined in
esh-cmd.el.gz.
Signature
(eshell-rewrite-while-command TERMS)
Documentation
Rewrite a while command into its equivalent Eshell command form.
Because the implementation of while relies upon conditional
evaluation of its argument (i.e., use of a Lisp special form), it
must be implemented via rewriting, rather than as a function.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-cmd.el.gz
(defun eshell-rewrite-while-command (terms)
"Rewrite a `while' command into its equivalent Eshell command form.
Because the implementation of `while' relies upon conditional
evaluation of its argument (i.e., use of a Lisp special form), it
must be implemented via rewriting, rather than as a function."
(if (and (stringp (car terms))
(member (car terms) '("while" "until")))
(eshell-structure-basic-command
'while '("while" "until") (car terms)
(eshell-invokify-arg (cadr terms) nil t)
`(eshell-protect
,(eshell-invokify-arg (car (last terms)) t)))))