From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 19:07:47 2011 Received: (at submit) by debbugs.gnu.org; 29 Oct 2011 23:07:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKI0B-0004qX-5z for submit@debbugs.gnu.org; Sat, 29 Oct 2011 19:07:47 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKI06-0004qN-CG for submit@debbugs.gnu.org; Sat, 29 Oct 2011 19:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKHy6-0001Za-K8 for submit@debbugs.gnu.org; Sat, 29 Oct 2011 19:05:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:56036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHy6-0001ZW-If for submit@debbugs.gnu.org; Sat, 29 Oct 2011 19:05:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHy5-0000qk-Mm for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:05:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKHy4-0001ZM-Ef for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:05:37 -0400 Received: from gateway-b.fh-trier.de ([143.93.54.182]:42864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKHy4-0001ZB-3N for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:05:36 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum FH-Trier (r/ft)] Received: from luca (dslb-084-059-109-215.pools.arcor-ip.net [84.59.109.215]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTPSA id BB7FF17B4AB for ; Sun, 30 Oct 2011 01:05:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=fh-trier.de; s=default; t=1319929518; bh=nHUOEt5GWv2bxvhggt3m+C/Yg7A=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UFs+JP3hqRqNH2Yi+y9HZq2Xd6LN4IRv6pjvx620hCY0UIH2yvxb2PhzMoMEooYMp tXT0k94yYwKQ+8u2FD1dU8DUsS8HCLMqONq+HoIh7SX+WKi/2IQtKSrIXDivU4m77r LcYgfenn2hwekh2uG85d/MEHTCxCxYBtYkEHJZKU= Received: from [127.0.0.1] (helo=luca) by luca with esmtp (Exim 4.72) (envelope-from ) id 1RKI1S-0004oo-Mp for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 01:09:06 +0200 From: Andreas Politz To: bug-gnu-emacs@gnu.org Subject: 24.0.90; eshell:for command destructivly modifies list variables Date: Sun, 30 Oct 2011 01:09:06 +0200 Message-ID: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) M-x eshell $ for l in $load-path {echo $l} Do this two times. After the first time the value of `load-path' is gone, because the lisp code implementing the loop destructively modifies this list. Idea of the following solution: Copy it. diff -c -L /usr/share/emacs/24.0.90/lisp/eshell/esh-cmd.el.gz -L \#\ /tmp/jka-com2122MHr /tmp/buffer-content-2122LbA *** /usr/share/emacs/24.0.90/lisp/eshell/esh-cmd.el.gz --- # *************** *** 494,500 **** (if (listp elem) elem (list 'list elem)))) ! (cdr (cddr terms))))) (list 'eshell-command-body (list 'quote (list nil))) (list 'eshell-test-body --- 494,501 ---- (if (listp elem) elem (list 'list elem)))) ! (cdr (cddr terms))) ! (list nil))) (list 'eshell-command-body (list 'quote (list nil))) (list 'eshell-test-body From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 30 00:02:18 2011 Received: (at 9907) by debbugs.gnu.org; 30 Oct 2011 04:02:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKMbB-0004YZ-1v for submit@debbugs.gnu.org; Sun, 30 Oct 2011 00:02:18 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKMb4-0004YO-VV for 9907@debbugs.gnu.org; Sun, 30 Oct 2011 00:02:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAGvLrE5FxK2K/2dsb2JhbAA5CalpgQaBcgEBBAFWIwULCzQSFBgNJBMbh2excIVUgy4EoUSERQ X-IronPort-AV: E=Sophos;i="4.69,425,1315195200"; d="scan'208";a="145148844" Received: from 69-196-173-138.dsl.teksavvy.com (HELO pastel.home) ([69.196.173.138]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 29 Oct 2011 23:59:43 -0400 Received: by pastel.home (Postfix, from userid 20848) id D15B158E17; Sat, 29 Oct 2011 23:59:42 -0400 (EDT) From: Stefan Monnier To: Andreas Politz Subject: Re: bug#9907: 24.0.90; eshell:for command destructivly modifies list variables Message-ID: References: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> Date: Sat, 29 Oct 2011 23:59:42 -0400 In-Reply-To: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> (Andreas Politz's message of "Sun, 30 Oct 2011 01:09:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9907 Cc: 9907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > Do this two times. After the first time the value of `load-path' is > gone, because the lisp code implementing the loop destructively modifies > this list. Idea of the following solution: Copy it. Thanks. I've installed the patch below instead, which uses backquotes to clarify the code and simply avoids the in-place modification instead of copying the list. Stefan === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-10-30 03:39:11 +0000 +++ lisp/ChangeLog 2011-10-30 03:51:01 +0000 @@ -1,3 +1,18 @@ +2011-10-30 Stefan Monnier + + * eshell/esh-cmd.el (eshell-rewrite-for-command): Don't modify the list + in place (bug#9907). + (eshell-subcommand-arg-values, eshell-rewrite-named-command) + (eshell-rewrite-if-command, eshell-rewrite-for-command) + (eshell-structure-basic-command, eshell-rewrite-while-command) + (eshell-invokify-arg, eshell-parse-pipeline, eshell-parse-command) + (eshell-parse-subcommand-argument, eshell-parse-lisp-argument) + (eshell-trap-errors, eshell-do-pipelines, eshell-do-eval) + (eshell-do-pipelines-synchronously, eshell-eval-command): + Use backquotes and prefer setq to set. + (eshell-lookup-function, function-p-func, eshell-functionp): Remove. + (eshell-macrop): Use functionp. + 2011-10-30 Chong Yidong * emulation/viper-cmd.el (viper-exec-change): Use push-mark === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2011-03-05 20:07:27 +0000 +++ lisp/eshell/esh-cmd.el 2011-10-30 03:57:59 +0000 @@ -356,35 +356,32 @@ (mapcar (function (lambda (cmd) + (setq cmd (if (or (not (car sep-terms)) (string= (car sep-terms) ";")) - (setq cmd - (eshell-parse-pipeline cmd (not (car sep-terms)))) - (setq cmd - (list 'eshell-do-subjob - (list 'list (eshell-parse-pipeline cmd))))) + (eshell-parse-pipeline cmd (not (car sep-terms))) + `(eshell-do-subjob + (list ,(eshell-parse-pipeline cmd))))) (setq sep-terms (cdr sep-terms)) (if eshell-in-pipeline-p cmd - (list 'eshell-trap-errors cmd)))) + `(eshell-trap-errors ,cmd)))) (eshell-separate-commands terms "[&;]" nil 'sep-terms)))) (let ((cmd commands)) (while cmd (if (cdr cmd) - (setcar cmd (list 'eshell-commands (car cmd)))) + (setcar cmd `(eshell-commands ,(car cmd)))) (setq cmd (cdr cmd)))) (setq commands - (append (list 'progn) - (if top-level - (list '(run-hooks 'eshell-pre-command-hook))) - (if (not top-level) + `(progn + ,@(if top-level + '((run-hooks 'eshell-pre-command-hook))) + ,@(if (not top-level) commands - (list - (list 'catch (quote 'top-level) - (append (list 'progn) commands)) - '(run-hooks 'eshell-post-command-hook))))) + `((catch 'top-level (progn ,@commands)) + (run-hooks 'eshell-post-command-hook))))) (if top-level - (list 'eshell-commands commands) + `(eshell-commands ,commands) commands))) (defun eshell-debug-command (tag subform) @@ -417,9 +414,8 @@ (while terms (if (and (listp (car terms)) (eq (caar terms) 'eshell-as-subcommand)) - (setcar terms (list 'eshell-convert - (list 'eshell-command-to-value - (car terms))))) + (setcar terms `(eshell-convert + (eshell-command-to-value ,(car terms))))) (setq terms (cdr terms)))) (defun eshell-rewrite-sexp-command (terms) @@ -443,7 +439,7 @@ (cmd (car terms)) (args (cdr terms))) (if args - (list sym cmd (append (list 'list) (cdr terms))) + (list sym cmd `(list ,@(cdr terms))) (list sym cmd)))) (defvar eshell-command-body) @@ -469,62 +465,37 @@ (eq (car (cadr arg)) 'eshell-command-to-value)) (if share-output (cadr (cadr arg)) - (list 'eshell-commands (cadr (cadr arg)) - silent)) + `(eshell-commands ,(cadr (cadr arg)) ,silent)) arg)) +(defvar eshell-last-command-status) ;Define in esh-io.el. + (defun eshell-rewrite-for-command (terms) "Rewrite a `for' command into its equivalent Eshell command form. Because the implementation of `for' 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)) - (string= (car terms) "for") - (stringp (nth 2 terms)) - (string= (nth 2 terms) "in")) + (if (and (equal (car terms) "for") + (equal (nth 2 terms) "in")) (let ((body (car (last terms)))) (setcdr (last terms 2) nil) - (list - 'let (list (list 'for-items + `(let ((for-items (append - (list 'append) - (mapcar - (function + ,@(mapcar (lambda (elem) (if (listp elem) elem - (list 'list elem)))) + `(list ,elem))) (cdr (cddr terms))))) - (list 'eshell-command-body - (list 'quote (list nil))) - (list 'eshell-test-body - (list 'quote (list nil)))) - (list - 'progn - (list - 'while (list 'car (list 'symbol-value - (list 'quote 'for-items))) - (list - 'progn - (list 'let - (list (list (intern (cadr terms)) - (list 'car - (list 'symbol-value - (list 'quote 'for-items))))) - (list 'eshell-protect - (eshell-invokify-arg body t))) - (list 'setcar 'for-items - (list 'cadr - (list 'symbol-value - (list 'quote 'for-items)))) - (list 'setcdr 'for-items - (list 'cddr - (list 'symbol-value - (list 'quote 'for-items)))))) - (list 'eshell-close-handles - 'eshell-last-command-status - (list 'list (quote 'quote) - 'eshell-last-command-result))))))) + (eshell-command-body '(nil)) + (eshell-test-body '(nil))) + (while (consp for-items) + (let ((,(intern (cadr terms)) (car for-items))) + (eshell-protect ,(eshell-invokify-arg body t))) + (setq for-items (cdr for-items))) + (eshell-close-handles + eshell-last-command-status + (list 'quote eshell-last-command-result)))))) (defun eshell-structure-basic-command (func names keyword test body &optional else vocal-test) @@ -540,8 +511,8 @@ ;; that determine the truth of the statement. (unless (eq (car test) 'eshell-convert) (setq test - (list 'progn test - (list 'eshell-exit-success-p)))) + `(progn ,test + (eshell-exit-success-p)))) ;; should we reverse the sense of the test? This depends ;; on the `names' parameter. If it's the symbol nil, yes. @@ -551,20 +522,16 @@ (if (or (eq names nil) (and (listp names) (string= keyword (cadr names)))) - (setq test (list 'not test))) + (setq test `(not ,test))) ;; finally, create the form that represents this structured ;; command - (list - 'let (list (list 'eshell-command-body - (list 'quote (list nil))) - (list 'eshell-test-body - (list 'quote (list nil)))) - (list func test body else) - (list 'eshell-close-handles - 'eshell-last-command-status - (list 'list (quote 'quote) - 'eshell-last-command-result)))) + `(let ((eshell-command-body '(nil)) + (eshell-test-body '(nil))) + (,func ,test ,body ,else) + (eshell-close-handles + eshell-last-command-status + (list 'quote eshell-last-command-result)))) (defun eshell-rewrite-while-command (terms) "Rewrite a `while' command into its equivalent Eshell command form. @@ -576,8 +543,8 @@ (eshell-structure-basic-command 'while '("while" "until") (car terms) (eshell-invokify-arg (cadr terms) nil t) - (list 'eshell-protect - (eshell-invokify-arg (car (last terms)) t))))) + `(eshell-protect + ,(eshell-invokify-arg (car (last terms)) t))))) (defun eshell-rewrite-if-command (terms) "Rewrite an `if' command into its equivalent Eshell command form. @@ -589,15 +556,14 @@ (eshell-structure-basic-command 'if '("if" "unless") (car terms) (eshell-invokify-arg (cadr terms) nil t) - (list 'eshell-protect - (eshell-invokify-arg - (if (= (length terms) 4) - (car (last terms 2)) - (car (last terms))) t)) + `(eshell-protect + ,(eshell-invokify-arg (car (last terms (if (= (length terms) 4) 2))) + t)) (if (= (length terms) 4) - (list 'eshell-protect - (eshell-invokify-arg - (car (last terms)))) t)))) + `(eshell-protect + ,(eshell-invokify-arg (car (last terms)))) t)))) + +(defvar eshell-last-command-result) ;Defined in esh-io.el. (defun eshell-exit-success-p () "Return non-nil if the last command was \"successful\". @@ -634,8 +600,7 @@ (if (<= (length pieces) 1) (car pieces) (assert (not eshell-in-pipeline-p)) - (list 'eshell-execute-pipeline - (list 'quote pieces)))))) + `(eshell-execute-pipeline (quote ,pieces)))))) (setq bp (cdr bp)))) ;; `results' might be empty; this happens in the case of ;; multi-line input @@ -648,8 +613,8 @@ (assert (car sep-terms)) (setq final (eshell-structure-basic-command 'if (string= (car sep-terms) "&&") "if" - (list 'eshell-protect (car results)) - (list 'eshell-protect final) + `(eshell-protect ,(car results)) + `(eshell-protect ,final) nil t) results (cdr results) sep-terms (cdr sep-terms))) @@ -667,8 +632,8 @@ (throw 'eshell-incomplete ?\{) (when (eshell-arg-delimiter (1+ end)) (prog1 - (list 'eshell-as-subcommand - (eshell-parse-command (cons (1+ (point)) end))) + `(eshell-as-subcommand + ,(eshell-parse-command (cons (1+ (point)) end))) (goto-char (1+ end)))))))) (defun eshell-parse-lisp-argument () @@ -683,8 +648,8 @@ (end-of-file (throw 'eshell-incomplete ?\())))) (if (eshell-arg-delimiter) - (list 'eshell-command-to-value - (list 'eshell-lisp-command (list 'quote obj))) + `(eshell-command-to-value + (eshell-lisp-command (quote ,obj))) (ignore (goto-char here)))))) (defun eshell-separate-commands (terms separator &optional @@ -759,7 +724,7 @@ Someday, when Scheme will become the dominant Emacs language, all of this grossness will be made to disappear by using `call/cc'..." - `(let ((eshell-this-command-hook (list 'ignore))) + `(let ((eshell-this-command-hook '(ignore))) (eshell-condition-case err (prog1 ,object @@ -769,6 +734,9 @@ (eshell-errorn (error-message-string err)) (eshell-close-handles 1))))) +(defvar eshell-output-handle) ;Defined in esh-io.el. +(defvar eshell-error-handle) ;Defined in esh-io.el. + (defmacro eshell-copy-handles (object) "Duplicate current I/O handles, so OBJECT works with its own copy." `(let ((eshell-current-handles @@ -793,14 +761,13 @@ (progn ,(when (cdr pipeline) `(let (nextproc) - (progn - (set 'nextproc + (setq nextproc (eshell-do-pipelines (quote ,(cdr pipeline)) t)) (eshell-set-output-handle ,eshell-output-handle 'append nextproc) (eshell-set-output-handle ,eshell-error-handle 'append nextproc) - (set 'tailproc (or tailproc nextproc))))) + (setq tailproc (or tailproc nextproc)))) ,(let ((head (car pipeline))) (if (memq (car head) '(let progn)) (setq head (car (last head)))) @@ -824,19 +791,17 @@ This is used on systems where `start-process' is not supported." (when (setq pipeline (cadr pipeline)) `(let (result) - (progn ,(when (cdr pipeline) `(let (output-marker) - (progn - (set 'output-marker ,(point-marker)) + (setq output-marker ,(point-marker)) (eshell-set-output-handle ,eshell-output-handle 'append output-marker) (eshell-set-output-handle ,eshell-error-handle - 'append output-marker)))) + 'append output-marker))) ,(let ((head (car pipeline))) (if (memq (car head) '(let progn)) (setq head (car (last head)))) - ;;; FIXME: is deferrable significant here? + ;; FIXME: is deferrable significant here? (when (memq (car head) eshell-deferrable-commands) (ignore (setcar head @@ -846,15 +811,15 @@ ;; redirected as we found them before running the pipe. ,(if (null (cdr pipeline)) `(progn - (set 'eshell-current-handles tail-handles) - (set 'eshell-in-pipeline-p nil))) - (set 'result ,(car pipeline)) + (setq eshell-current-handles tail-handles) + (setq eshell-in-pipeline-p nil))) + (setq result ,(car pipeline)) ;; tailproc gets the result of the last successful process in ;; the pipeline. - (set 'tailproc (or result tailproc)) + (setq tailproc (or result tailproc)) ,(if (cdr pipeline) `(eshell-do-pipelines-synchronously (quote ,(cdr pipeline)))) - result)))) + result))) (defalias 'eshell-process-identity 'identity) @@ -965,14 +930,12 @@ ;; we can just stick the new command at the end of the current ;; one, and everything will happen as it should (setcdr (last (cdr eshell-current-command)) - (list (list 'let '((here (and (eobp) (point)))) - (and input - (list 'insert-and-inherit - (concat input "\n"))) - '(if here + (list `(let ((here (and (eobp) (point)))) + ,(and input + `(insert-and-inherit ,(concat input "\n"))) + (if here (eshell-update-markers here)) - (list 'eshell-do-eval - (list 'quote command))))) + (eshell-do-eval ',command)))) (and eshell-debug-command (with-current-buffer (get-buffer-create "*eshell last cmd*") (erase-buffer) @@ -1016,6 +979,7 @@ (defmacro eshell-manipulate (tag &rest commands) "Manipulate a COMMAND form, with TAG as a debug identifier." + (declare (indent 1)) ;; Check `bound'ness since at compile time the code until here has not ;; executed yet. (if (not (and (boundp 'eshell-debug-command) eshell-debug-command)) @@ -1025,39 +989,13 @@ ,@commands (eshell-debug-command ,(concat "done " (eval tag)) form)))) -(put 'eshell-manipulate 'lisp-indent-function 1) - -;; eshell-lookup-function, eshell-functionp, and eshell-macrop taken -;; from edebug - -(defsubst eshell-lookup-function (object) - "Return the ultimate function definition of OBJECT." - (while (and (symbolp object) (fboundp object)) - (setq object (symbol-function object))) - object) - -(defconst function-p-func - (if (fboundp 'compiled-function-p) - 'compiled-function-p - 'byte-code-function-p)) - -(defsubst eshell-functionp (object) - "Returns the function named by OBJECT, or nil if it is not a function." - (setq object (eshell-lookup-function object)) - (if (or (subrp object) - (funcall function-p-func object) - (and (listp object) - (eq (car object) 'lambda) - (listp (car (cdr object))))) - object)) - (defsubst eshell-macrop (object) "Return t if OBJECT is a macro or nil otherwise." - (setq object (eshell-lookup-function object)) - (if (and (listp object) + (and (symbolp object) (fboundp object) + (setq object (indirect-function object)) + (listp object) (eq 'macro (car object)) - (eshell-functionp (cdr object))) - t)) + (functionp (cdr object)))) (defun eshell-do-eval (form &optional synchronous-p) "Evaluate form, simplifying it as we go. @@ -1107,9 +1045,11 @@ (eshell-do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) + (setcar eshell-command-body + (eshell-copy-tree (if (cadr (eshell-do-eval (car eshell-test-body))) - (setcar eshell-command-body (eshell-copy-tree (cadr args))) - (setcar eshell-command-body (eshell-copy-tree (car (cddr args))))) + (cadr args) + (car (cddr args))))) (eshell-do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (setcar eshell-test-body nil)) @@ -1140,9 +1080,7 @@ (setq args (cdr args))) (unless (eq (caar args) 'eshell-do-eval) (eshell-manipulate "handling special form" - (setcar args (list 'eshell-do-eval - (list 'quote (car args)) - synchronous-p)))) + (setcar args `(eshell-do-eval ',(car args) ,synchronous-p)))) (eval form)) (t (if (and args (not (memq (car form) '(run-hooks)))) @@ -1362,6 +1300,8 @@ "Evaluate FORM, trapping errors and returning them." (eshell-eval* 'eshell-printn 'eshell-errorn form)) +(defvar eshell-last-output-end) ;Defined in esh-mode.el. + (defun eshell-lisp-command (object &optional args) "Insert Lisp OBJECT, using ARGS if a function." (catch 'eshell-external ; deferred to an external command From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 30 01:46:11 2011 Received: (at submit) by debbugs.gnu.org; 30 Oct 2011 05:46:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKODi-0006xO-PN for submit@debbugs.gnu.org; Sun, 30 Oct 2011 01:46:11 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKODf-0006xD-E8 for submit@debbugs.gnu.org; Sun, 30 Oct 2011 01:46:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKOBe-0008G5-Du for submit@debbugs.gnu.org; Sun, 30 Oct 2011 01:44:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:47724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKOBe-0008G1-CT for submit@debbugs.gnu.org; Sun, 30 Oct 2011 01:44:02 -0400 Received: from eggs.gnu.org ([140.186.70.92]:50152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKOBc-0000g9-OF for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 01:44:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKOBb-0008Fh-OV for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 01:44:00 -0400 Received: from lo.gmane.org ([80.91.229.12]:57258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKOBb-0008FZ-Hj for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 01:43:59 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RKOBa-0006c5-I5 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2011 06:43:58 +0100 Received: from 205.77.197.77.rev.sfr.net ([77.197.77.205]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Oct 2011 06:43:58 +0100 Received: from thierry.volpiatto by 205.77.197.77.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Oct 2011 06:43:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#9907: 24.0.90; eshell:for command destructivly modifies list variables Date: Sun, 30 Oct 2011 06:43:46 +0100 Lines: 17 Message-ID: <87boszjap9.fsf@gmail.com> References: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 205.77.197.77.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:NdnuvEv/5fqOVNeEGDqxu0Z1ptQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Stefan Monnier writes: >> Do this two times. After the first time the value of `load-path' is >> gone, because the lisp code implementing the loop destructively modifies >> this list. Idea of the following solution: Copy it. > > Thanks. I've installed the patch below instead, which uses backquotes > to clarify the code and simply avoids the in-place modification instead > of copying the list. Eshell hang forever with this patch when using initial example given by Andy. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 30 04:03:06 2011 Received: (at 9907) by debbugs.gnu.org; 30 Oct 2011 08:03:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKQMD-0001nx-SD for submit@debbugs.gnu.org; Sun, 30 Oct 2011 04:03:06 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKQMA-0001nR-8s for 9907@debbugs.gnu.org; Sun, 30 Oct 2011 04:03:03 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p9U80uDh029110; Sun, 30 Oct 2011 04:00:56 -0400 Received: by pastel.home (Postfix, from userid 20848) id E9A1358E17; Sun, 30 Oct 2011 04:00:55 -0400 (EDT) From: Stefan Monnier To: Thierry Volpiatto Subject: Re: bug#9907: 24.0.90; eshell:for command destructivly modifies list variables Message-ID: References: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> <87boszjap9.fsf@gmail.com> Date: Sun, 30 Oct 2011 04:00:55 -0400 In-Reply-To: <87boszjap9.fsf@gmail.com> (Thierry Volpiatto's message of "Sun, 30 Oct 2011 06:43:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4025=0 X-NAI-Spam-Version: 2.2.0.9286 : core <4025> : streams <696668> : uri <995236> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 9907 Cc: 9907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) >>> Do this two times. After the first time the value of `load-path' is >>> gone, because the lisp code implementing the loop destructively modifies >>> this list. Idea of the following solution: Copy it. >> Thanks. I've installed the patch below instead, which uses backquotes >> to clarify the code and simply avoids the in-place modification instead >> of copying the list. > Eshell hang forever with this patch when using initial example given by > Andy. Sorry 'bout that. Should be fixed now, but please confirm. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 30 14:39:23 2011 Received: (at 9907) by debbugs.gnu.org; 30 Oct 2011 18:39:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKaHx-0002TW-KV for submit@debbugs.gnu.org; Sun, 30 Oct 2011 14:39:22 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKaHv-0002TO-8a for 9907@debbugs.gnu.org; Sun, 30 Oct 2011 14:39:20 -0400 Received: by faas12 with SMTP id s12so5072859faa.3 for <9907@debbugs.gnu.org>; Sun, 30 Oct 2011 11:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=j944m3/1tBoUSOAfBcDN0Z8KpmUD0eZanaTOBfNWku4=; b=wK62GeolmUYhgtQIf/Qa1oydJc9Qyn90tCPONwQtONUw90wM3juu3uPmBq+IVv3KeH x96Ed7Y/Sv2Z5LitDWwmI+gkSLTdNzWFDsNSHnyPnDnQZYBQDAuvOVMPVtFFsozleylT iDaQzCI+uPWpsPJLbL8OQ0tRotQCduk1a2ilQ= Received: by 10.223.76.27 with SMTP id a27mr22749261fak.12.1319999830465; Sun, 30 Oct 2011 11:37:10 -0700 (PDT) Received: from thierry-MM061 (205.77.197.77.rev.sfr.net. [77.197.77.205]) by mx.google.com with ESMTPS id l26sm20377145fad.17.2011.10.30.11.37.06 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 30 Oct 2011 11:37:08 -0700 (PDT) From: Thierry Volpiatto To: Stefan Monnier Subject: Re: bug#9907: 24.0.90; eshell:for command destructivly modifies list variables References: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> <87boszjap9.fsf@gmail.com> Date: Sun, 30 Oct 2011 19:37:04 +0100 In-Reply-To: (Stefan Monnier's message of "Sun, 30 Oct 2011 04:00:55 -0400") Message-ID: <877h3mnx67.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 9907 Cc: 9907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) Stefan Monnier writes: >>>> Do this two times. After the first time the value of `load-path' is >>>> gone, because the lisp code implementing the loop destructively modifies >>>> this list. Idea of the following solution: Copy it. >>> Thanks. I've installed the patch below instead, which uses backquotes >>> to clarify the code and simply avoids the in-place modification instead >>> of copying the list. >> Eshell hang forever with this patch when using initial example given by >> Andy. > > Sorry 'bout that. Should be fixed now, but please confirm. It is working fine now, thanks. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 17:31:45 2011 Received: (at control) by debbugs.gnu.org; 17 Nov 2011 22:31:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RRAUj-00077W-6Q for submit@debbugs.gnu.org; Thu, 17 Nov 2011 17:31:45 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RRAUg-00077P-Dk for control@debbugs.gnu.org; Thu, 17 Nov 2011 17:31:43 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RRATp-0008VV-2G for control@debbugs.gnu.org; Thu, 17 Nov 2011 17:30:49 -0500 Date: Thu, 17 Nov 2011 17:30:49 -0500 Message-Id: Subject: control message for bug 9907 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) close 9907 24.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 21:07:03 2011 Received: (at 9907) by debbugs.gnu.org; 18 Nov 2011 02:07:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RRDqw-0004Ej-3Q for submit@debbugs.gnu.org; Thu, 17 Nov 2011 21:07:03 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RRDqj-0004ES-9M for 9907@debbugs.gnu.org; Thu, 17 Nov 2011 21:06:51 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RRDpq-0007EV-Go; Thu, 17 Nov 2011 21:05:46 -0500 From: Glenn Morris To: 9907@debbugs.gnu.org Subject: Re: bug#9907: 24.0.90; eshell:for command destructivly modifies list variables References: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> <87boszjap9.fsf@gmail.com> <877h3mnx67.fsf@gmail.com> X-Spook: assassination Soviet George W. Bush Saddam Hussein X-Ran: sx%#1R,sBM!D;Y[i/;H*^&V|dO-61.|[Ue'w:-u?6h|{2=\j:7D\9&sA?^hv\J. X-Hue: blue X-Attribution: GM Date: Thu, 17 Nov 2011 21:05:46 -0500 Message-ID: <65pqgqmbgl.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Debbugs-Envelope-To: 9907 Cc: Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org >> Sorry 'bout that. Should be fixed now, but please confirm. > It is working fine now, thanks. It was pointed out on emacs-devel that eshell pipes no longer work (it's because I just closed this bug...): emacs -Q -f eshell ls | grep foo -> Wrong type argument: symbolp, (quote nil) and a stale grep process in M-x list-processes Debugger entered--Lisp error: (wrong-type-argument symbolp (quote nil)) (setq (quote nil) (quote #)) eval((setq (quote nil) (quote #))) (setq result (eval form)) (ignore (setq result (eval form))) (catch (quote eshell-replace-command) (ignore (setq result (eval form)))) (setq new-form (catch (quote eshell-replace-command) (ignore (setq result= (eval form))))) (if (setq new-form (catch (quote eshell-replace-command) (ignore (setq re= sult (eval form))))) (progn (eshell-manipulate "substituting replacement fo= rm" (setcar form (car new-form)) (setcdr form (cdr new-form))) (eshell-do-e= val form synchronous-p)) (if (and (memq (car form) eshell-deferrable-comman= ds) (not eshell-current-subjob-p) result (eshell-processp result)) (if sync= hronous-p (eshell/wait result) (eshell-manipulate "inserting ignore form" (= setcar form (quote ignore)) (setcdr form nil)) (throw (quote eshell-defer) = result)) (list (quote quote) result))) (let (result new-form) (if (setq new-form (catch (quote eshell-replace-co= mmand) (ignore (setq result (eval form))))) (progn (eshell-manipulate "subs= tituting replacement form" (setcar form (car new-form)) (setcdr form (cdr n= ew-form))) (eshell-do-eval form synchronous-p)) (if (and (memq (car form) e= shell-deferrable-commands) (not eshell-current-subjob-p) result (eshell-pro= cessp result)) (if synchronous-p (eshell/wait result) (eshell-manipulate "i= nserting ignore form" (setcar form (quote ignore)) (setcdr form nil)) (thro= w (quote eshell-defer) result)) (list (quote quote) result)))) (cond ((eq (car form) (quote progn)) (car (last form))) ((eq (car form) (= quote prog1)) (cadr form)) (t (let (result new-form) (if (setq new-form (ca= tch (quote eshell-replace-command) (ignore (setq result ...)))) (progn (esh= ell-manipulate "substituting replacement form" (setcar form (car new-form))= (setcdr form (cdr new-form))) (eshell-do-eval form synchronous-p)) (if (an= d (memq (car form) eshell-deferrable-commands) (not eshell-current-subjob-p= ) result (eshell-processp result)) (if synchronous-p (eshell/wait result) (= eshell-manipulate "inserting ignore form" (setcar form ...) (setcdr form ni= l)) (throw (quote eshell-defer) result)) (list (quote quote) result)))))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((setq (quote nil) (quote #)) nil) (let (nextproc) (eshell-do-eval (quote (setq (quote nil) (quote #))) nil) (eshell-set-output-handle 1 (quote append) nextproc) (eshell= -set-output-handle 2 (quote append) nextproc) (setq tailproc (or tailproc n= extproc))) eval((let (nextproc) (eshell-do-eval (quote (setq (quote nil) (quote #))) nil) (eshell-set-output-handle 1 (quote append) nextproc) (e= shell-set-output-handle 2 (quote append) nextproc) (setq tailproc (or tailp= roc nextproc)))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((let (nextproc) (eshell-do-eval (quote (setq (quote nil) (= quote #))) nil) (eshell-set-output-handle 1 (quote append) ne= xtproc) (eshell-set-output-handle 2 (quote append) nextproc) (setq tailproc= (or tailproc nextproc))) nil) (setcar args (eshell-do-eval (car args) synchronous-p)) (while args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq= args (cdr args))) (progn (while args (setcar args (eshell-do-eval (car args) synchronous-p)= ) (setq args (cdr args)))) (eshell-manipulate (format "evaluating arguments to `%s'" (symbol-name (c= ar form))) (while args (setcar args (eshell-do-eval (car args) synchronous-= p)) (setq args (cdr args)))) (if (and args (not (memq (car form) (quote (run-hooks))))) (eshell-manipu= late (format "evaluating arguments to `%s'" (symbol-name (car form))) (whil= e args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq args (= cdr args))))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((progn (let (nextproc) (eshell-do-eval (quote (setq (quote= nil) (quote #))) nil) (eshell-set-output-handle 1 (quote app= end) nextproc) (eshell-set-output-handle 2 (quote append) nextproc) (setq t= ailproc (or tailproc nextproc))) nil (let ((eshell-in-pipeline-p (quote fir= st))) (eshell-named-command* "ls"))) nil) (let ((eshell-current-handles (quote [nil (t . 1) (t . 1)]))) (eshell-do-= eval (quote (progn (let (nextproc) (eshell-do-eval (quote (setq ... ...)) n= il) (eshell-set-output-handle 1 (quote append) nextproc) (eshell-set-output= -handle 2 (quote append) nextproc) (setq tailproc (or tailproc nextproc))) = nil (let ((eshell-in-pipeline-p (quote first))) (eshell-named-command* "ls"= )))) nil)) eval((let ((eshell-current-handles (quote [nil (t . 1) (t . 1)]))) (eshel= l-do-eval (quote (progn (let (nextproc) (eshell-do-eval (quote (setq ... ..= .)) nil) (eshell-set-output-handle 1 (quote append) nextproc) (eshell-set-o= utput-handle 2 (quote append) nextproc) (setq tailproc (or tailproc nextpro= c))) nil (let ((eshell-in-pipeline-p (quote first))) (eshell-named-command*= "ls")))) nil))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((let ((eshell-current-handles (quote [nil (t . 1) (t . 1)]= ))) (eshell-do-eval (quote (progn (let (nextproc) (eshell-do-eval (quote (s= etq ... ...)) nil) (eshell-set-output-handle 1 (quote append) nextproc) (es= hell-set-output-handle 2 (quote append) nextproc) (setq tailproc (or tailpr= oc nextproc))) nil (let ((eshell-in-pipeline-p (quote first))) (eshell-name= d-command* "ls")))) nil)) nil) (setcar args (eshell-do-eval (car args) synchronous-p)) (while args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq= args (cdr args))) (progn (while args (setcar args (eshell-do-eval (car args) synchronous-p)= ) (setq args (cdr args)))) (eshell-manipulate (format "evaluating arguments to `%s'" (symbol-name (c= ar form))) (while args (setcar args (eshell-do-eval (car args) synchronous-= p)) (setq args (cdr args)))) (if (and args (not (memq (car form) (quote (run-hooks))))) (eshell-manipu= late (format "evaluating arguments to `%s'" (symbol-name (car form))) (whil= e args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq args (= cdr args))))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((progn (let ((eshell-current-handles (quote [nil (t . 1) (= t . 1)]))) (eshell-do-eval (quote (progn (let (nextproc) (eshell-do-eval (q= uote ...) nil) (eshell-set-output-handle 1 (quote append) nextproc) (eshell= -set-output-handle 2 (quote append) nextproc) (setq tailproc (or tailproc n= extproc))) nil (let ((eshell-in-pipeline-p ...)) (eshell-named-command* "ls= ")))) nil)) (eshell-process-identity tailproc)) nil) (let ((eshell-in-pipeline-p (quote t)) tailproc) (eshell-do-eval (quote (= progn (let ((eshell-current-handles (quote [nil ... ...]))) (eshell-do-eval= (quote (progn ... nil ...)) nil)) (eshell-process-identity tailproc))) nil= )) eval((let ((eshell-in-pipeline-p (quote t)) tailproc) (eshell-do-eval (qu= ote (progn (let ((eshell-current-handles (quote [nil ... ...]))) (eshell-do= -eval (quote (progn ... nil ...)) nil)) (eshell-process-identity tailproc))= ) nil))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((let ((eshell-in-pipeline-p (quote t)) tailproc) (eshell-d= o-eval (quote (progn (let ((eshell-current-handles (quote [nil ... ...]))) = (eshell-do-eval (quote (progn ... nil ...)) nil)) (eshell-process-identity = tailproc))) nil)) nil) (setcar args (eshell-do-eval (car args) synchronous-p)) (while args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq= args (cdr args))) (progn (while args (setcar args (eshell-do-eval (car args) synchronous-p)= ) (setq args (cdr args)))) (eshell-manipulate (format "evaluating arguments to `%s'" (symbol-name (c= ar form))) (while args (setcar args (eshell-do-eval (car args) synchronous-= p)) (setq args (cdr args)))) (if (and args (not (memq (car form) (quote (run-hooks))))) (eshell-manipu= late (format "evaluating arguments to `%s'" (symbol-name (car form))) (whil= e args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq args (= cdr args))))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((prog1 (let ((eshell-in-pipeline-p (quote t)) tailproc) (e= shell-do-eval (quote (progn (let ((eshell-current-handles ...)) (eshell-do-= eval (quote ...) nil)) (eshell-process-identity tailproc))) nil)) (run-hook= s (quote eshell-this-command-hook))) nil) (condition-case err (eshell-do-eval (quote (prog1 (let ((eshell-in-pipeli= ne-p (quote t)) tailproc) (eshell-do-eval (quote (progn ... ...)) nil)) (ru= n-hooks (quote eshell-this-command-hook)))) nil) (error (run-hooks (quote e= shell-this-command-hook)) (eshell-errorn (error-message-string err)) (eshel= l-close-handles 1))) eval((condition-case err (eshell-do-eval (quote (prog1 (let ((eshell-in-p= ipeline-p (quote t)) tailproc) (eshell-do-eval (quote (progn ... ...)) nil)= ) (run-hooks (quote eshell-this-command-hook)))) nil) (error (run-hooks (qu= ote eshell-this-command-hook)) (eshell-errorn (error-message-string err)) (= eshell-close-handles 1)))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((condition-case err (eshell-do-eval (quote (prog1 (let ((e= shell-in-pipeline-p (quote t)) tailproc) (eshell-do-eval (quote (progn ... = ...)) nil)) (run-hooks (quote eshell-this-command-hook)))) nil) (error (run= -hooks (quote eshell-this-command-hook)) (eshell-errorn (error-message-stri= ng err)) (eshell-close-handles 1))) nil) (let ((eshell-this-command-hook (quote (ignore)))) (eshell-do-eval (quote= (condition-case err (eshell-do-eval (quote (prog1 (let ... ...) (run-hooks= ...))) nil) (error (run-hooks (quote eshell-this-command-hook)) (eshell-er= rorn (error-message-string err)) (eshell-close-handles 1)))) nil)) eval((let ((eshell-this-command-hook (quote (ignore)))) (eshell-do-eval (= quote (condition-case err (eshell-do-eval (quote (prog1 (let ... ...) (run-= hooks ...))) nil) (error (run-hooks (quote eshell-this-command-hook)) (eshe= ll-errorn (error-message-string err)) (eshell-close-handles 1)))) nil))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((let ((eshell-this-command-hook (quote (ignore)))) (eshell= -do-eval (quote (condition-case err (eshell-do-eval (quote (prog1 (let ... = ...) (run-hooks ...))) nil) (error (run-hooks (quote eshell-this-command-ho= ok)) (eshell-errorn (error-message-string err)) (eshell-close-handles 1))))= nil)) nil) (setcar args (eshell-do-eval (car args) synchronous-p)) (while args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq= args (cdr args))) (progn (while args (setcar args (eshell-do-eval (car args) synchronous-p)= ) (setq args (cdr args)))) (eshell-manipulate (format "evaluating arguments to `%s'" (symbol-name (c= ar form))) (while args (setcar args (eshell-do-eval (car args) synchronous-= p)) (setq args (cdr args)))) (if (and args (not (memq (car form) (quote (run-hooks))))) (eshell-manipu= late (format "evaluating arguments to `%s'" (symbol-name (car form))) (whil= e args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq args (= cdr args))))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((progn (let ((eshell-this-command-hook (quote (ignore)))) = (eshell-do-eval (quote (condition-case err (eshell-do-eval (quote (prog1 ..= . ...)) nil) (error (run-hooks (quote eshell-this-command-hook)) (eshell-er= rorn (error-message-string err)) (eshell-close-handles 1)))) nil))) nil) (catch (quote top-level) (eshell-do-eval (quote (progn (let ((eshell-this= -command-hook (quote ...))) (eshell-do-eval (quote (condition-case err ... = ...)) nil)))) nil)) eval((catch (quote top-level) (eshell-do-eval (quote (progn (let ((eshell= -this-command-hook (quote ...))) (eshell-do-eval (quote (condition-case err= ... ...)) nil)))) nil))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((catch (quote top-level) (eshell-do-eval (quote (progn (le= t ((eshell-this-command-hook (quote ...))) (eshell-do-eval (quote (conditio= n-case err ... ...)) nil)))) nil)) nil) (setcar args (eshell-do-eval (car args) synchronous-p)) (while args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq= args (cdr args))) (progn (while args (setcar args (eshell-do-eval (car args) synchronous-p)= ) (setq args (cdr args)))) (eshell-manipulate (format "evaluating arguments to `%s'" (symbol-name (c= ar form))) (while args (setcar args (eshell-do-eval (car args) synchronous-= p)) (setq args (cdr args)))) (if (and args (not (memq (car form) (quote (run-hooks))))) (eshell-manipu= late (format "evaluating arguments to `%s'" (symbol-name (car form))) (whil= e args (setcar args (eshell-do-eval (car args) synchronous-p)) (setq args (= cdr args))))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((progn (quote nil) (catch (quote top-level) (eshell-do-eva= l (quote (progn (let ((eshell-this-command-hook ...)) (eshell-do-eval (quot= e ...) nil)))) nil)) (run-hooks (quote eshell-post-command-hook))) nil) (let ((eshell-current-handles (quote [nil (t . 1) (t . 1)])) eshell-curre= nt-subjob-p) (eshell-do-eval (quote (progn (quote nil) (catch (quote top-le= vel) (eshell-do-eval (quote (progn ...)) nil)) (run-hooks (quote eshell-pos= t-command-hook)))) nil)) eval((let ((eshell-current-handles (quote [nil (t . 1) (t . 1)])) eshell-= current-subjob-p) (eshell-do-eval (quote (progn (quote nil) (catch (quote t= op-level) (eshell-do-eval (quote (progn ...)) nil)) (run-hooks (quote eshel= l-post-command-hook)))) nil))) (cond ((eq (car form) (quote while)) (when (car eshell-command-body) (ass= ert (not synchronous-p)) (eshell-do-eval (car eshell-command-body)) (setcar= eshell-command-body nil) (setcar eshell-test-body nil)) (unless (car eshel= l-test-body) (setcar eshell-test-body (eshell-copy-tree (car args)))) (whil= e (cadr (eshell-do-eval (car eshell-test-body))) (setcar eshell-command-bod= y (if (cddr args) (\` (progn (\,@ ...))) (eshell-copy-tree (cadr args)))) (= eshell-do-eval (car eshell-command-body) synchronous-p) (setcar eshell-comm= and-body nil) (setcar eshell-test-body (eshell-copy-tree (car args)))) (set= car eshell-command-body nil)) ((eq (car form) (quote if)) (if (car eshell-c= ommand-body) (progn (assert (not synchronous-p)) (eshell-do-eval (car eshel= l-command-body))) (unless (car eshell-test-body) (setcar eshell-test-body (= eshell-copy-tree (car args)))) (setcar eshell-command-body (eshell-copy-tre= e (if (cadr (eshell-do-eval ...)) (cadr args) (car (cddr args))))) (eshell-= do-eval (car eshell-command-body) synchronous-p)) (setcar eshell-command-bo= dy nil) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (set= car (cdr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((e= q (car form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args)= synchronous-p)) (eval form)) ((memq (car form) (quote (let catch condition= -case unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car = (cadr args)) (quote eshell-do-eval)))) (eshell-manipulate "evaluating let a= rgs" (dolist (letarg (car args)) (if (and (listp letarg) (not ...)) (setcdr= letarg (list ...)))))) (unless (eq (car form) (quote unwind-protect)) (set= q args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) (eshell= -manipulate "handling special form" (setcar args (\` (eshell-do-eval (quote= ...) (\, synchronous-p)))))) (eval form)) (t (if (and args (not (memq (car= form) (quote (run-hooks))))) (eshell-manipulate (format "evaluating argume= nts to `%s'" (symbol-name (car form))) (while args (setcar args (eshell-do-= eval (car args) synchronous-p)) (setq args (cdr args))))) (cond ((eq (car f= orm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr= form)) (t (let (result new-form) (if (setq new-form (catch ... ...)) (prog= n (eshell-manipulate "substituting replacement form" ... ...) (eshell-do-ev= al form synchronous-p)) (if (and ... ... result ...) (if synchronous-p ... = ... ...) (list ... result)))))))) (let ((args (cdr form))) (cond ((eq (car form) (quote while)) (when (car = eshell-command-body) (assert (not synchronous-p)) (eshell-do-eval (car eshe= ll-command-body)) (setcar eshell-command-body nil) (setcar eshell-test-body= nil)) (unless (car eshell-test-body) (setcar eshell-test-body (eshell-copy= -tree (car args)))) (while (cadr (eshell-do-eval (car eshell-test-body))) (= setcar eshell-command-body (if (cddr args) (\` (progn ...)) (eshell-copy-tr= ee (cadr args)))) (eshell-do-eval (car eshell-command-body) synchronous-p) = (setcar eshell-command-body nil) (setcar eshell-test-body (eshell-copy-tree= (car args)))) (setcar eshell-command-body nil)) ((eq (car form) (quote if)= ) (if (car eshell-command-body) (progn (assert (not synchronous-p)) (eshell= -do-eval (car eshell-command-body))) (unless (car eshell-test-body) (setcar= eshell-test-body (eshell-copy-tree (car args)))) (setcar eshell-command-bo= dy (eshell-copy-tree (if (cadr ...) (cadr args) (car ...)))) (eshell-do-eva= l (car eshell-command-body) synchronous-p)) (setcar eshell-command-body nil= ) (setcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (c= dr args) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car= form) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synch= ronous-p)) (eval form)) ((memq (car form) (quote (let catch condition-case = unwind-protect))) (if (and (eq (car form) (quote let)) (not (eq (car ...) (= quote eshell-do-eval)))) (eshell-manipulate "evaluating let args" (dolist (= letarg (car args)) (if (and ... ...) (setcdr letarg ...))))) (unless (eq (c= ar form) (quote unwind-protect)) (setq args (cdr args))) (unless (eq (caar = args) (quote eshell-do-eval)) (eshell-manipulate "handling special form" (s= etcar args (\` (eshell-do-eval ... ...))))) (eval form)) (t (if (and args (= not (memq (car form) (quote ...)))) (eshell-manipulate (format "evaluating = arguments to `%s'" (symbol-name (car form))) (while args (setcar args (eshe= ll-do-eval ... synchronous-p)) (setq args (cdr args))))) (cond ((eq (car fo= rm) (quote progn)) (car (last form))) ((eq (car form) (quote prog1)) (cadr = form)) (t (let (result new-form) (if (setq new-form ...) (progn ... ...) (i= f ... ... ...)))))))) (cond ((not (listp form)) (list (quote quote) (eval form))) ((memq (car f= orm) (quote (quote function))) form) (t (when (eq (car form) (quote eshell-= do-eval)) (setq form (cadr (cadr form)))) (if (eshell-macrop (car form)) (l= et ((exp (eshell-copy-tree (macroexpand form)))) (eshell-manipulate (format= "expanding macro `%s'" (symbol-name (car form))) (setcar form (car exp)) (= setcdr form (cdr exp))))) (let ((args (cdr form))) (cond ((eq (car form) (q= uote while)) (when (car eshell-command-body) (assert (not synchronous-p)) (= eshell-do-eval (car eshell-command-body)) (setcar eshell-command-body nil) = (setcar eshell-test-body nil)) (unless (car eshell-test-body) (setcar eshel= l-test-body (eshell-copy-tree ...))) (while (cadr (eshell-do-eval ...)) (se= tcar eshell-command-body (if ... ... ...)) (eshell-do-eval (car eshell-comm= and-body) synchronous-p) (setcar eshell-command-body nil) (setcar eshell-te= st-body (eshell-copy-tree ...))) (setcar eshell-command-body nil)) ((eq (ca= r form) (quote if)) (if (car eshell-command-body) (progn (assert ...) (eshe= ll-do-eval ...)) (unless (car eshell-test-body) (setcar eshell-test-body ..= .)) (setcar eshell-command-body (eshell-copy-tree ...)) (eshell-do-eval (ca= r eshell-command-body) synchronous-p)) (setcar eshell-command-body nil) (se= tcar eshell-test-body nil)) ((eq (car form) (quote setcar)) (setcar (cdr ar= gs) (eshell-do-eval (cadr args) synchronous-p)) (eval form)) ((eq (car form= ) (quote setcdr)) (setcar (cdr args) (eshell-do-eval (cadr args) synchronou= s-p)) (eval form)) ((memq (car form) (quote (let catch condition-case unwin= d-protect))) (if (and (eq ... ...) (not ...)) (eshell-manipulate "evaluatin= g let args" (dolist ... ...))) (unless (eq (car form) (quote unwind-protect= )) (setq args (cdr args))) (unless (eq (caar args) (quote eshell-do-eval)) = (eshell-manipulate "handling special form" (setcar args ...))) (eval form))= (t (if (and args (not ...)) (eshell-manipulate (format "evaluating argumen= ts to `%s'" ...) (while args ... ...))) (cond ((eq ... ...) (car ...)) ((eq= ... ...) (cadr form)) (t (let ... ...)))))))) eshell-do-eval((let ((eshell-current-handles (quote [nil (t . 1) (t . 1)]= )) eshell-current-subjob-p) (eshell-do-eval (quote (progn (quote nil) (catc= h (quote top-level) (eshell-do-eval (quote (progn ...)) nil)) (run-hooks (q= uote eshell-post-command-hook)))) nil))) (setq retval (eshell-do-eval eshell-current-command)) (ignore (setq retval (eshell-do-eval eshell-current-command))) (catch (quote eshell-defer) (ignore (setq retval (eshell-do-eval eshell-c= urrent-command)))) (let* (retval (proc (catch (quote eshell-defer) (ignore (setq retval (esh= ell-do-eval eshell-current-command)))))) (if (eshell-processp proc) (ignore= (setq eshell-last-async-proc proc)) (cadr retval))) (progn (let* (retval (proc (catch (quote eshell-defer) (ignore (setq retv= al (eshell-do-eval eshell-current-command)))))) (if (eshell-processp proc) = (ignore (setq eshell-last-async-proc proc)) (cadr retval)))) (if eshell-current-command (progn (let* (retval (proc (catch (quote eshel= l-defer) (ignore (setq retval ...))))) (if (eshell-processp proc) (ignore (= setq eshell-last-async-proc proc)) (cadr retval))))) (when eshell-current-command (let* (retval (proc (catch (quote eshell-def= er) (ignore (setq retval (eshell-do-eval eshell-current-command)))))) (if (= eshell-processp proc) (ignore (setq eshell-last-async-proc proc)) (cadr ret= val)))) (progn (setq eshell-last-async-proc nil) (when eshell-current-command (le= t* (retval (proc (catch (quote eshell-defer) (ignore (setq retval ...))))) = (if (eshell-processp proc) (ignore (setq eshell-last-async-proc proc)) (cad= r retval))))) (condition-case err (progn (setq eshell-last-async-proc nil) (when eshell= -current-command (let* (retval (proc (catch (quote eshell-defer) (ignore ..= .)))) (if (eshell-processp proc) (ignore (setq eshell-last-async-proc proc)= ) (cadr retval))))) (error (error (error-message-string err)))) (eshell-condition-case err (progn (setq eshell-last-async-proc nil) (when= eshell-current-command (let* (retval (proc (catch (quote eshell-defer) (ig= nore ...)))) (if (eshell-processp proc) (ignore (setq eshell-last-async-pro= c proc)) (cadr retval))))) (error (error (error-message-string err)))) eshell-resume-eval() (catch (quote eshell-incomplete) (eshell-resume-eval)) (let ((delim (catch (quote eshell-incomplete) (eshell-resume-eval)))) (if= (listp delim) (setq delim (car delim))) (if (and delim (not (eq delim t)))= (error "Unmatched delimiter: %c" delim))) (if eshell-current-command (setcdr (last (cdr eshell-current-command)) (l= ist (\` (let ((here (and ... ...))) (\, (and input (\` ...))) (if here (esh= ell-update-markers here)) (eshell-do-eval (quote (\, command))))))) (and es= hell-debug-command (with-current-buffer (get-buffer-create "*eshell last cm= d*") (erase-buffer) (insert "command: \"" input "\"\n"))) (setq eshell-curr= ent-command command) (let ((delim (catch (quote eshell-incomplete) (eshell-= resume-eval)))) (if (listp delim) (setq delim (car delim))) (if (and delim = (not (eq delim t))) (error "Unmatched delimiter: %c" delim)))) eshell-eval-command((let ((eshell-current-handles (quote [nil (t . 1) (t = . 1)])) eshell-current-subjob-p) (eshell-do-eval (quote (progn (quote nil) = (catch (quote top-level) (eshell-do-eval (quote (progn ...)) nil)) (run-hoo= ks (quote eshell-post-command-hook)))) nil)) "ls | grep foo") (if (eshell-invoke-directly cmd input) (eval cmd) (eshell-eval-command cm= d input)) (ignore (if (eshell-invoke-directly cmd input) (eval cmd) (eshell-eval-co= mmand cmd input))) (catch (quote eshell-terminal) (ignore (if (eshell-invoke-directly cmd in= put) (eval cmd) (eshell-eval-command cmd input)))) (and (catch (quote eshell-terminal) (ignore (if (eshell-invoke-directly c= md input) (eval cmd) (eshell-eval-command cmd input)))) (eshell-life-is-too= -much)) (progn (eshell-update-markers eshell-last-output-end) (setq input (buffer= -substring-no-properties eshell-last-input-start (1- eshell-last-input-end)= )) (run-hooks (quote eshell-input-filter-functions)) (and (catch (quote esh= ell-terminal) (ignore (if (eshell-invoke-directly cmd input) (eval cmd) (es= hell-eval-command cmd input)))) (eshell-life-is-too-much))) (if cmd (progn (eshell-update-markers eshell-last-output-end) (setq input= (buffer-substring-no-properties eshell-last-input-start (1- eshell-last-in= put-end))) (run-hooks (quote eshell-input-filter-functions)) (and (catch (q= uote eshell-terminal) (ignore (if (eshell-invoke-directly cmd input) (eval = cmd) (eshell-eval-command cmd input)))) (eshell-life-is-too-much)))) (when cmd (eshell-update-markers eshell-last-output-end) (setq input (buf= fer-substring-no-properties eshell-last-input-start (1- eshell-last-input-e= nd))) (run-hooks (quote eshell-input-filter-functions)) (and (catch (quote = eshell-terminal) (ignore (if (eshell-invoke-directly cmd input) (eval cmd) = (eshell-eval-command cmd input)))) (eshell-life-is-too-much))) (let ((cmd (eshell-parse-command-input eshell-last-output-end (1- (point)= )))) (when cmd (eshell-update-markers eshell-last-output-end) (setq input (= buffer-substring-no-properties eshell-last-input-start (1- eshell-last-inpu= t-end))) (run-hooks (quote eshell-input-filter-functions)) (and (catch (quo= te eshell-terminal) (ignore (if (eshell-invoke-directly cmd input) (eval cm= d) (eshell-eval-command cmd input)))) (eshell-life-is-too-much)))) (progn (setq input (buffer-substring-no-properties eshell-last-output-end= (1- (point)))) (run-hook-with-args (quote eshell-expand-input-functions) e= shell-last-output-end (1- (point))) (let ((cmd (eshell-parse-command-input = eshell-last-output-end (1- (point))))) (when cmd (eshell-update-markers esh= ell-last-output-end) (setq input (buffer-substring-no-properties eshell-las= t-input-start (1- eshell-last-input-end))) (run-hooks (quote eshell-input-f= ilter-functions)) (and (catch (quote eshell-terminal) (ignore (if (eshell-i= nvoke-directly cmd input) (eval cmd) (eshell-eval-command cmd input)))) (es= hell-life-is-too-much))))) (condition-case err (progn (setq input (buffer-substring-no-properties es= hell-last-output-end (1- (point)))) (run-hook-with-args (quote eshell-expan= d-input-functions) eshell-last-output-end (1- (point))) (let ((cmd (eshell-= parse-command-input eshell-last-output-end (1- (point))))) (when cmd (eshel= l-update-markers eshell-last-output-end) (setq input (buffer-substring-no-p= roperties eshell-last-input-start (1- eshell-last-input-end))) (run-hooks (= quote eshell-input-filter-functions)) (and (catch (quote eshell-terminal) (= ignore (if ... ... ...))) (eshell-life-is-too-much))))) (quit (eshell-reset= t) (run-hooks (quote eshell-post-command-hook)) (signal (quote quit) nil))= (error (eshell-reset t) (eshell-interactive-print (concat (error-message-s= tring err) "\n")) (run-hooks (quote eshell-post-command-hook)) (insert-and-= inherit input))) (eshell-condition-case err (progn (setq input (buffer-substring-no-proper= ties eshell-last-output-end (1- (point)))) (run-hook-with-args (quote eshel= l-expand-input-functions) eshell-last-output-end (1- (point))) (let ((cmd (= eshell-parse-command-input eshell-last-output-end (1- (point))))) (when cmd= (eshell-update-markers eshell-last-output-end) (setq input (buffer-substri= ng-no-properties eshell-last-input-start (1- eshell-last-input-end))) (run-= hooks (quote eshell-input-filter-functions)) (and (catch (quote eshell-term= inal) (ignore (if ... ... ...))) (eshell-life-is-too-much))))) (quit (eshel= l-reset t) (run-hooks (quote eshell-post-command-hook)) (signal (quote quit= ) nil)) (error (eshell-reset t) (eshell-interactive-print (concat (error-me= ssage-string err) "\n")) (run-hooks (quote eshell-post-command-hook)) (inse= rt-and-inherit input))) (let (input) (eshell-condition-case err (progn (setq input (buffer-substr= ing-no-properties eshell-last-output-end (1- (point)))) (run-hook-with-args= (quote eshell-expand-input-functions) eshell-last-output-end (1- (point)))= (let ((cmd (eshell-parse-command-input eshell-last-output-end (1- ...)))) = (when cmd (eshell-update-markers eshell-last-output-end) (setq input (buffe= r-substring-no-properties eshell-last-input-start (1- eshell-last-input-end= ))) (run-hooks (quote eshell-input-filter-functions)) (and (catch (quote es= hell-terminal) (ignore ...)) (eshell-life-is-too-much))))) (quit (eshell-re= set t) (run-hooks (quote eshell-post-command-hook)) (signal (quote quit) ni= l)) (error (eshell-reset t) (eshell-interactive-print (concat (error-messag= e-string err) "\n")) (run-hooks (quote eshell-post-command-hook)) (insert-a= nd-inherit input)))) (if (=3D eshell-last-output-end (point)) (run-hooks (quote eshell-post-co= mmand-hook)) (let (input) (eshell-condition-case err (progn (setq input (bu= ffer-substring-no-properties eshell-last-output-end (1- (point)))) (run-hoo= k-with-args (quote eshell-expand-input-functions) eshell-last-output-end (1= - (point))) (let ((cmd (eshell-parse-command-input eshell-last-output-end .= ..))) (when cmd (eshell-update-markers eshell-last-output-end) (setq input = (buffer-substring-no-properties eshell-last-input-start ...)) (run-hooks (q= uote eshell-input-filter-functions)) (and (catch ... ...) (eshell-life-is-t= oo-much))))) (quit (eshell-reset t) (run-hooks (quote eshell-post-command-h= ook)) (signal (quote quit) nil)) (error (eshell-reset t) (eshell-interactiv= e-print (concat (error-message-string err) "\n")) (run-hooks (quote eshell-= post-command-hook)) (insert-and-inherit input))))) (if proc-running-p (progn (eshell-update-markers eshell-last-output-end) = (if (or eshell-send-direct-to-subprocesses (=3D eshell-last-input-start esh= ell-last-input-end)) (unless no-newline (process-send-string (eshell-intera= ctive-process) "\n")) (process-send-region (eshell-interactive-process) esh= ell-last-input-start eshell-last-input-end))) (if (=3D eshell-last-output-e= nd (point)) (run-hooks (quote eshell-post-command-hook)) (let (input) (eshe= ll-condition-case err (progn (setq input (buffer-substring-no-properties es= hell-last-output-end (1- ...))) (run-hook-with-args (quote eshell-expand-in= put-functions) eshell-last-output-end (1- (point))) (let ((cmd ...)) (when = cmd (eshell-update-markers eshell-last-output-end) (setq input ...) (run-ho= oks ...) (and ... ...)))) (quit (eshell-reset t) (run-hooks (quote eshell-p= ost-command-hook)) (signal (quote quit) nil)) (error (eshell-reset t) (eshe= ll-interactive-print (concat (error-message-string err) "\n")) (run-hooks (= quote eshell-post-command-hook)) (insert-and-inherit input)))))) (if (and proc-running-p (not (eq (process-status (eshell-interactive-proc= ess)) (quote run)))) nil (if (or proc-running-p (>=3D (point) eshell-last-o= utput-end)) (goto-char (point-max)) (let ((copy (eshell-get-old-input use-r= egion))) (goto-char eshell-last-output-end) (insert-and-inherit copy))) (un= less (or no-newline (and eshell-send-direct-to-subprocesses proc-running-p)= ) (insert-before-markers-and-inherit 10)) (if proc-running-p (progn (eshell= -update-markers eshell-last-output-end) (if (or eshell-send-direct-to-subpr= ocesses (=3D eshell-last-input-start eshell-last-input-end)) (unless no-new= line (process-send-string (eshell-interactive-process) "\n")) (process-send= -region (eshell-interactive-process) eshell-last-input-start eshell-last-in= put-end))) (if (=3D eshell-last-output-end (point)) (run-hooks (quote eshel= l-post-command-hook)) (let (input) (eshell-condition-case err (progn (setq = input (buffer-substring-no-properties eshell-last-output-end ...)) (run-hoo= k-with-args (quote eshell-expand-input-functions) eshell-last-output-end (1= - ...)) (let (...) (when cmd ... ... ... ...))) (quit (eshell-reset t) (run= -hooks (quote eshell-post-command-hook)) (signal (quote quit) nil)) (error = (eshell-reset t) (eshell-interactive-print (concat ... "\n")) (run-hooks (q= uote eshell-post-command-hook)) (insert-and-inherit input))))))) (unless (and proc-running-p (not (eq (process-status (eshell-interactive-= process)) (quote run)))) (if (or proc-running-p (>=3D (point) eshell-last-o= utput-end)) (goto-char (point-max)) (let ((copy (eshell-get-old-input use-r= egion))) (goto-char eshell-last-output-end) (insert-and-inherit copy))) (un= less (or no-newline (and eshell-send-direct-to-subprocesses proc-running-p)= ) (insert-before-markers-and-inherit 10)) (if proc-running-p (progn (eshell= -update-markers eshell-last-output-end) (if (or eshell-send-direct-to-subpr= ocesses (=3D eshell-last-input-start eshell-last-input-end)) (unless no-new= line (process-send-string (eshell-interactive-process) "\n")) (process-send= -region (eshell-interactive-process) eshell-last-input-start eshell-last-in= put-end))) (if (=3D eshell-last-output-end (point)) (run-hooks (quote eshel= l-post-command-hook)) (let (input) (eshell-condition-case err (progn (setq = input (buffer-substring-no-properties eshell-last-output-end ...)) (run-hoo= k-with-args (quote eshell-expand-input-functions) eshell-last-output-end (1= - ...)) (let (...) (when cmd ... ... ... ...))) (quit (eshell-reset t) (run= -hooks (quote eshell-post-command-hook)) (signal (quote quit) nil)) (error = (eshell-reset t) (eshell-interactive-print (concat ... "\n")) (run-hooks (q= uote eshell-post-command-hook)) (insert-and-inherit input))))))) (let ((proc-running-p (and (eshell-interactive-process) (not queue-p))) (= inhibit-point-motion-hooks t) after-change-functions) (unless (and proc-run= ning-p (not (eq (process-status (eshell-interactive-process)) (quote run)))= ) (if (or proc-running-p (>=3D (point) eshell-last-output-end)) (goto-char = (point-max)) (let ((copy (eshell-get-old-input use-region))) (goto-char esh= ell-last-output-end) (insert-and-inherit copy))) (unless (or no-newline (an= d eshell-send-direct-to-subprocesses proc-running-p)) (insert-before-marker= s-and-inherit 10)) (if proc-running-p (progn (eshell-update-markers eshell-= last-output-end) (if (or eshell-send-direct-to-subprocesses (=3D eshell-las= t-input-start eshell-last-input-end)) (unless no-newline (process-send-stri= ng (eshell-interactive-process) "\n")) (process-send-region (eshell-interac= tive-process) eshell-last-input-start eshell-last-input-end))) (if (=3D esh= ell-last-output-end (point)) (run-hooks (quote eshell-post-command-hook)) (= let (input) (eshell-condition-case err (progn (setq input ...) (run-hook-wi= th-args ... eshell-last-output-end ...) (let ... ...)) (quit (eshell-reset = t) (run-hooks ...) (signal ... nil)) (error (eshell-reset t) (eshell-intera= ctive-print ...) (run-hooks ...) (insert-and-inherit input)))))))) eshell-send-input(nil) call-interactively(eshell-send-input nil nil) From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 09:50:57 2011 Received: (at 9907) by debbugs.gnu.org; 18 Nov 2011 14:50:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RRPmK-0005Tv-IU for submit@debbugs.gnu.org; Fri, 18 Nov 2011 09:50:56 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RRPmH-0005Ti-RP for 9907@debbugs.gnu.org; Fri, 18 Nov 2011 09:50:55 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAINvxk5FpZVk/2dsb2JhbAA6CaolgQaBcgEBBAEnLyMFCwsOJhIUGA0kE4gDtmyGZIMzBIgXmXeESg X-IronPort-AV: E=Sophos;i="4.69,533,1315195200"; d="scan'208";a="148486497" Received: from 69-165-149-100.dsl.teksavvy.com (HELO pastel.home) ([69.165.149.100]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Nov 2011 09:49:50 -0500 Received: by pastel.home (Postfix, from userid 20848) id 3B47C5936A; Fri, 18 Nov 2011 09:49:49 -0500 (EST) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#9907: 24.0.90; eshell:for command destructivly modifies list variables Message-ID: References: <87ehxv5ral.fsf@luca.i-did-not-set--mail-host-address--so-tickle-me> <87boszjap9.fsf@gmail.com> <877h3mnx67.fsf@gmail.com> <65pqgqmbgl.fsf@fencepost.gnu.org> Date: Fri, 18 Nov 2011 09:49:49 -0500 In-Reply-To: <65pqgqmbgl.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 17 Nov 2011 21:05:46 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 9907 Cc: Chming , 9907@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) >>> Sorry 'bout that. Should be fixed now, but please confirm. >> It is working fine now, thanks. > It was pointed out on emacs-devel that eshell pipes no longer work > (it's because I just closed this bug...): > emacs -Q -f eshell > ls | grep foo > -> Wrong type argument: symbolp, (quote nil) > and a stale grep process in M-x list-processes I just installed the patch below which seems to fix this problem. Stefan === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-11-18 14:34:39 +0000 +++ lisp/ChangeLog 2011-11-18 14:48:12 +0000 @@ -1,5 +1,10 @@ 2011-11-18 Stefan Monnier + * eshell/esh-cmd.el (eshell-do-eval): Handle `setq' (bug#9907). + (eshell-rewrite-for-command): Remove workaround. + (eshell-do-pipelines, eshell-do-pipelines-synchronously) + (eshell-do-eval, eshell-exec-lisp): Avoid gratuitous setq. + * files-x.el (modify-file-local-variable): Obey commenting conventions. 2011-11-17 Glenn Morris === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2011-11-14 23:59:56 +0000 +++ lisp/eshell/esh-cmd.el 2011-11-18 14:41:23 +0000 @@ -480,25 +480,20 @@ (let ((body (car (last terms)))) (setcdr (last terms 2) nil) `(let ((for-items - ;; Apparently, eshell-do-eval only works for immutable - ;; let-bindings, i.e. we cannot use `setq' on `for-items'. - ;; Instead we store the list in the car of a cons-cell (which - ;; acts as a ref-cell) so we can setcar instead of setq. - (list (append ,@(mapcar (lambda (elem) (if (listp elem) elem `(list ,elem))) - (cdr (cddr terms)))))) + (cdr (cddr terms))))) (eshell-command-body '(nil)) (eshell-test-body '(nil))) - (while (consp (car for-items)) - (let ((,(intern (cadr terms)) (caar for-items))) + (while (consp for-items) + (let ((,(intern (cadr terms)) (car for-items))) (eshell-protect ,(eshell-invokify-arg body t))) - (setcar for-items (cdar for-items))) + (setq for-items (cdr for-items))) (eshell-close-handles eshell-last-command-status (list 'quote eshell-last-command-result)))))) @@ -766,9 +761,8 @@ `(eshell-copy-handles (progn ,(when (cdr pipeline) - `(let (nextproc) - (setq nextproc - (eshell-do-pipelines (quote ,(cdr pipeline)) t)) + `(let ((nextproc + (eshell-do-pipelines (quote ,(cdr pipeline)) t))) (eshell-set-output-handle ,eshell-output-handle 'append nextproc) (eshell-set-output-handle ,eshell-error-handle @@ -796,10 +790,9 @@ Output of each command is passed as input to the next one in the pipeline. This is used on systems where `start-process' is not supported." (when (setq pipeline (cadr pipeline)) - `(let (result) + `(progn ,(when (cdr pipeline) - `(let (output-marker) - (setq output-marker ,(point-marker)) + `(let ((output-marker ,(point-marker))) (eshell-set-output-handle ,eshell-output-handle 'append output-marker) (eshell-set-output-handle ,eshell-error-handle @@ -819,13 +812,13 @@ `(progn (setq eshell-current-handles tail-handles) (setq eshell-in-pipeline-p nil))) - (setq result ,(car pipeline)) + (let ((result ,(car pipeline))) ;; tailproc gets the result of the last successful process in ;; the pipeline. (setq tailproc (or result tailproc)) ,(if (cdr pipeline) `(eshell-do-pipelines-synchronously (quote ,(cdr pipeline)))) - result))) + result)))) (defalias 'eshell-process-identity 'identity) @@ -890,8 +883,7 @@ (eshell-print "errors\n")) (if eshell-debug-command (eshell-print "commands\n"))) - ((or (string= (car args) "-h") - (string= (car args) "--help")) + ((member (car args) '("-h" "--help")) (eshell-print "usage: eshell-debug [kinds] This command is used to aid in debugging problems related to Eshell @@ -1091,6 +1083,11 @@ (eshell-manipulate "handling special form" (setcar args `(eshell-do-eval ',(car args) ,synchronous-p)))) (eval form)) + ((eq (car form) 'setq) + (if (cddr args) (error "Unsupported form (setq X1 E1 X2 E2..)")) + (eshell-manipulate "evaluating arguments to setq" + (setcar (cdr args) (eshell-do-eval (cadr args) synchronous-p))) + (list 'quote (eval form))) (t (if (and args (not (memq (car form) '(run-hooks)))) (eshell-manipulate @@ -1127,11 +1124,12 @@ ;; Thus, aliases can even contain references to asynchronous ;; sub-commands, and things will still work out as they ;; should. - (let (result new-form) - (if (setq new-form + (let* (result + (new-form (catch 'eshell-replace-command (ignore - (setq result (eval form))))) + (setq result (eval form)))))) + (if new-form (progn (eshell-manipulate "substituting replacement form" (setcar form (car new-form)) @@ -1247,14 +1245,12 @@ PRINTER and ERRPRINT are functions to use for printing regular messages, and errors. FORM-P should be non-nil if FUNC-OR-FORM represent a lisp form; ARGS will be ignored in that case." - (let (result) (eshell-condition-case err - (progn - (setq result + (let ((result (save-current-buffer (if form-p (eval func-or-form) - (apply func-or-form args)))) + (apply func-or-form args))))) (and result (funcall printer result)) result) (error @@ -1265,7 +1261,7 @@ (let ((func-doc (eldoc-get-fnsym-args-string func-or-form))) (setq msg (format "usage: %s" func-doc)))) (funcall errprint msg)) - nil)))) + nil))) (defsubst eshell-apply* (printer errprint func args) "Call FUNC, with ARGS, trapping errors and return them as output. === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2011-03-10 07:16:04 +0000 +++ lisp/eshell/esh-util.el 2011-11-18 14:14:57 +0000 @@ -140,14 +140,13 @@ (defmacro eshell-condition-case (tag form &rest handlers) "If `eshell-handle-errors' is non-nil, this is `condition-case'. Otherwise, evaluates FORM with no error handling." + (declare (indent 2)) (if eshell-handle-errors `(condition-case ,tag ,form ,@handlers) form)) -(put 'eshell-condition-case 'lisp-indent-function 2) - (defun eshell-find-delimiter (open close &optional bound reverse-p backslash-p) "From point, find the CLOSE delimiter corresponding to OPEN. @@ -275,14 +274,14 @@ text)) (defmacro eshell-for (for-var for-list &rest forms) - "Iterate through a list" + "Iterate through a list." + (declare (indent 2)) `(let ((list-iter ,for-list)) (while list-iter (let ((,for-var (car list-iter))) ,@forms) (setq list-iter (cdr list-iter))))) -(put 'eshell-for 'lisp-indent-function 2) (make-obsolete 'eshell-for 'dolist "24.1") From unknown Mon Aug 18 14:21:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 17 Dec 2011 12:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator