anchor.diff:          (restore)))))
   
   (defmacro with-restored-shell-environment (shell-environment &body body)
  +  "Evaluate body in a context where the state for `shell-environment'
  +is in effect.
  +
  +See `preserve-shell-environment'."
     `(call-with-restored-shell-environment ,shell-environment (lambda () ,@body)))
   
   (defmacro with-subshell (&body body)
  +  "Evaluate forms in an isolated shell environment.
  +
  +Changes to the shell environment will be confied to the dynamic extent
  +of the body of this form."
     (let ((env (gensym "ENV")))
       `(let ((,env (preserve-shell-environment :label 'with-subshell)))
          (unwind-protect
  
positive.code: (defparameter *special-variables-to-preserve* (fset:empty-set))
  
  (defun preserve-special-variable (symbol)
    (setf *special-variables-to-preserve* (fset:with *special-variables-to-preserve* symbol)))
  
  (defun preserve-special-variables ()
  
negative.code:       result)))
  
  (defun destroy-preserved-shell-environment (shell-environment)
    "Reclaim all the resources associated with the given preserved shell environment.
  
  It is safe to destroy a preserved shell environment multiple times.
  
  See `preserve-shell-environment'."
    (%destroy-preserved-shell-environment (preserved-environment-data shell-environment))
    (trivial-garbage:cancel-finalization shell-environment))
  
  