#!/usr/bin/perl

# takes a local environment and prints it out in a format suitable for copying,
# pasting, and then evaling into emacs

# this beats restarting emacs hands down.

# Hint:  eval-expression is bound to M-:

print "(setq process-environment (list ";

for $var (keys(%ENV)) {
  print "\"", $var, "=", $ENV{$var}, "\" ";
}

print "))\n";
