Function: eshell-manipulate

eshell-manipulate is a macro defined in esh-cmd.el.gz.

Signature

(eshell-manipulate FORM TAG &rest BODY)

Documentation

Manipulate a command FORM with BODY, using TAG as a debug identifier.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-cmd.el.gz
(defmacro eshell-manipulate (form tag &rest body)
  "Manipulate a command FORM with BODY, using TAG as a debug identifier."
  (declare (indent 2))
  (let ((tag-symbol (make-symbol "tag")))
    `(if (not (memq 'form eshell-debug-command))
         (progn ,@body)
       (let ((,tag-symbol ,tag))
         (eshell-always-debug-command 'form
           "%s\n\n%s" ,tag-symbol (eshell-stringify ,form))
         (unwind-protect
             (progn ,@body)
           (eshell-always-debug-command 'form
             "done %s\n\n%s" ,tag-symbol (eshell-stringify ,form)))))))