* libguile/eval.c (s_duplicate_binding): New static identifier.
(scm_m_case): Call scm_c_memq instead of implementing it inline.
(scm_m_define): Added comment about how we check for duplicate
formals.
(scm_m_do): Added check for duplicate bindings.
(scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
unnecessary consing when creating the memoized code.
(scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
scm_c_improper_memq to c_improper_memq, since it is not exported.
(transform_bindings): Call scm_c_memq rather than
scm_c_improper_memq.
(SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
* test-suite/tests/syntax.test (exception:missing/extra-expr-syntax):
New, introduced temporarily until all memoizers use the new way of
error reporting.
Adapted tests for 'if' to the new way of error reporting.