1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

* libguile/eval.c (s_macro_keyword): New static identifier.

(scm_m_define): Change order to first create binding and
	evaluating the expression afterwards.

	(scm_m_set_x): Memoize complete set! expression.  Only leave
	symbols if no binding exists at memoization time.  Throw error if
	assigning to a syntactic keyword.

	(lazy_memoize_variable): New function.

	(CEVAL): When execution set!, perform lazy memoization if
	unmemoized symbol is detected.

	* libguile/modules.c (module_variable): Return variables with
	unbound value.

	* libguile/tags.h: Fix comment.

	* test-suite/tests/syntax.test: Add test case to check the correct
	handling of define expressions.
This commit is contained in:
Dirk Herrmann 2004-04-26 19:59:03 +00:00
parent da8bcb2f70
commit 36245b66c2
6 changed files with 84 additions and 13 deletions

View file

@ -277,7 +277,7 @@ static SCM
module_variable (SCM module, SCM sym)
{
#define SCM_BOUND_THING_P(b) \
(SCM_VARIABLEP (b) && !SCM_UNBNDP (SCM_VARIABLE_REF (b)))
(!SCM_FALSEP (b))
/* 1. Check module obarray */
SCM b = scm_hashq_ref (SCM_MODULE_OBARRAY (module), sym, SCM_UNDEFINED);