From cb2dac8284e9fb4b4564075b53561f0e4b6b7709 Mon Sep 17 00:00:00 2001
From: agoncharov <agoncharov>
Date: Sat, 10 Oct 2009 16:51:55 +0000
Subject: [PATCH] Provide ext:getenv function.

---
 code/save.lisp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/code/save.lisp b/code/save.lisp
index 9b45eb820..804992f1b 100644
--- a/code/save.lisp
+++ b/code/save.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/save.lisp,v 1.62 2009/08/18 13:12:42 rtoy Rel $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/save.lisp,v 1.63 2009/10/10 16:51:55 agoncharov Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -19,7 +19,7 @@
 (in-package "LISP")
 
 (in-package "EXTENSIONS")
-(export '(print-herald *herald-items* save-lisp *before-save-initializations*
+(export '(print-herald getenv *herald-items* save-lisp *before-save-initializations*
 	  *after-save-initializations* *environment-list* *editor-lisp-p*))
 (in-package "LISP")
 
@@ -119,6 +119,9 @@
 	  "target:i18n/"
 	  "target:pcl/simple-streams/external-formats/")))
 
+(defun getenv (name)
+  "Return the value of the environment variable Name; nil if Name is unset."
+  (cdr (assoc (intern name *keyword-package*) *environment-list*)))
 
 
 ;;;; SAVE-LISP itself.
-- 
GitLab