From b75dfb878ae38a75bd54ce9d208f1f86d5ba26b1 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 15 Jan 2009 14:40:52 +0000 Subject: [PATCH] macro stepper: fixed documentation build (removed dependence on mred-kernel) svn: r13152 --- .../syntax-browser/interfaces.ss | 26 ++++++++++++++++++- collects/macro-debugger/util/notify.ss | 17 +----------- collects/macro-debugger/view/interfaces.ss | 25 +++++++++--------- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/collects/macro-debugger/syntax-browser/interfaces.ss b/collects/macro-debugger/syntax-browser/interfaces.ss index 9c7ade2634..7c60b40af9 100644 --- a/collects/macro-debugger/syntax-browser/interfaces.ss +++ b/collects/macro-debugger/syntax-browser/interfaces.ss @@ -1,9 +1,33 @@ #lang scheme/base (require scheme/class macro-debugger/util/class-iop - "../util/notify.ss") + (for-syntax scheme/base)) (provide (all-defined-out)) +;; Helpers + +(define-for-syntax (join . args) + (define (->string x) + (cond [(string? x) x] + [(symbol? x) (symbol->string x)] + [(identifier? x) (symbol->string (syntax-e x))] + [else (error '->string)])) + (string->symbol (apply string-append (map ->string args)))) + +;; not in notify.ss because notify depends on scheme/gui +(define-interface-expander methods:notify + (lambda (stx) + (syntax-case stx () + [(_ name ...) + (apply append + (for/list ([name (syntax->list #'(name ...))]) + (list ;; (join "init-" #'name) + (join "get-" name) + (join "set-" name) + (join "listen-" name))))]))) + +;; Interfaces + ;; config<%> (define-interface config<%> () ((methods:notify suffix-option diff --git a/collects/macro-debugger/util/notify.ss b/collects/macro-debugger/util/notify.ss index 8da4293f64..991bce1263 100644 --- a/collects/macro-debugger/util/notify.ss +++ b/collects/macro-debugger/util/notify.ss @@ -16,9 +16,7 @@ menu-option/notify-box menu-group/notify-box check-box/notify-box - choice/notify-box - - methods:notify) + choice/notify-box) (define-for-syntax (join . args) (define (->string x) @@ -74,19 +72,6 @@ (define/public-final (listen-name listener) (send name listen listener))))])) - -(define-interface-expander methods:notify - (lambda (stx) - (syntax-case stx () - [(_ name ...) - (apply append - (for/list ([name (syntax->list #'(name ...))]) - (list ;; (join "init-" #'name) - (join "get-" name) - (join "set-" name) - (join "listen-" name))))]))) - - (define-syntax (connect-to-pref stx) (syntax-case stx () [(connect-to-pref name pref) diff --git a/collects/macro-debugger/view/interfaces.ss b/collects/macro-debugger/view/interfaces.ss index d5d75aad3f..4c7ddae67f 100644 --- a/collects/macro-debugger/view/interfaces.ss +++ b/collects/macro-debugger/view/interfaces.ss @@ -1,23 +1,22 @@ #lang scheme/base (require macro-debugger/util/class-iop - "../util/notify.ss" (prefix-in sb: "../syntax-browser/interfaces.ss")) (provide (all-defined-out)) (define-interface config<%> (sb:config<%>) - ((methods:notify macro-hiding-mode - show-hiding-panel? - identifier=? - highlight-foci? - highlight-frontier? - show-rename-steps? - suppress-warnings? - one-by-one? - extra-navigation? - debug-catch-errors? - force-letrec-transformation? - split-context?))) + ((sb:methods:notify macro-hiding-mode + show-hiding-panel? + identifier=? + highlight-foci? + highlight-frontier? + show-rename-steps? + suppress-warnings? + one-by-one? + extra-navigation? + debug-catch-errors? + force-letrec-transformation? + split-context?))) (define-interface widget<%> () (get-config