From 1e0578bea0b0c499ee72f1be9fa6fe276521ed4a Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Mon, 15 May 2017 19:58:17 +0200 Subject: [PATCH 1/4] Small code cleanup in the expander Merge ##sys#undefine-macro! with ##sys#unregister-macro since the latter was just a wrapper around the former. --- expand.scm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/expand.scm b/expand.scm index 4397d22a..3a727b7f 100644 --- a/expand.scm +++ b/expand.scm @@ -204,18 +204,14 @@ (and-let* ((l (lookup sym (##sys#macro-environment)))) (pair? l)))) -(define (##sys#unregister-macro name) +(define (##sys#undefine-macro! name) (##sys#macro-environment ;; this builds up stack, but isn't used often anyway... - (let loop ((me (##sys#macro-environment)) (me2 '())) + (let loop ((me (##sys#macro-environment))) (cond ((null? me) '()) ((eq? name (caar me)) (cdr me)) (else (cons (car me) (loop (cdr me)))))))) -(define (##sys#undefine-macro! name) - (##sys#unregister-macro name) ) - - ;; The basic macro-expander (define (##sys#expand-0 exp dse cs?) -- 2.13.0