[movitz-cvs] CVS update: movitz/losp/muerte/basic-macros.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Fri Apr 16 18:55:07 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv7751

Modified Files:
	basic-macros.lisp 
Log Message:
Added macro define-global-variable.

Date: Fri Apr 16 14:55:07 2004
Author: ffjeld

Index: movitz/losp/muerte/basic-macros.lisp
diff -u movitz/losp/muerte/basic-macros.lisp:1.10 movitz/losp/muerte/basic-macros.lisp:1.11
--- movitz/losp/muerte/basic-macros.lisp:1.10	Wed Apr 14 17:59:34 2004
+++ movitz/losp/muerte/basic-macros.lisp	Fri Apr 16 14:55:07 2004
@@ -9,7 +9,7 @@
 ;;;; Created at:    Wed Nov  8 18:44:57 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: basic-macros.lisp,v 1.10 2004/04/14 21:59:34 ffjeld Exp $
+;;;; $Id: basic-macros.lisp,v 1.11 2004/04/16 18:55:07 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -1040,6 +1040,12 @@
        (:je 'boundp-done)
        (:stc)
       boundp-done)))
+
+(defmacro define-global-variable (name init-form &optional docstring)
+  "A global variable will be accessed by ignoring local bindings."
+  `(progn
+     (defparameter ,name ,init-form ,docstring)
+     (define-symbol-macro ,name (%symbol-global-value ',name))))
 
 (require :muerte/setf)
 





More information about the Movitz-cvs mailing list