From d49713a7b8c7167a193b103548b44f1713aff749 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 20 Feb 2016 16:26:10 -0800 Subject: [PATCH] update buttons; change cmd char to @ --- quad/quad/foo2.rkt | 2 +- quad/quad/lang/buttons.rkt | 6 +++--- quad/quad/lang/reader.rkt | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/quad/quad/foo2.rkt b/quad/quad/foo2.rkt index 278f7888..94855f29 100644 --- a/quad/quad/foo2.rkt +++ b/quad/quad/foo2.rkt @@ -1,3 +1,3 @@ #lang quad -1 1.1 1.2 Hello world and so on. 2 Hello world and so on. 3 Hello world and so on. 4 Hello world and so on. \ No newline at end of file +Hello @block-break[] world @block-break[] galaxy \ No newline at end of file diff --git a/quad/quad/lang/buttons.rkt b/quad/quad/lang/buttons.rkt index 3fc9eb9b..9c551c9f 100644 --- a/quad/quad/lang/buttons.rkt +++ b/quad/quad/lang/buttons.rkt @@ -19,7 +19,7 @@ http://pkg-build.racket-lang.org/doc/tools/drracket_module-language-tools.html#% |# -(define (make-command-char-button command-char) +(define (make-command-char-button) (let ([label "Render PDF"] [bitmap (make-object bitmap% html-png-path 'png/mask)] [callback (λ (drr-frame) @@ -38,6 +38,6 @@ http://pkg-build.racket-lang.org/doc/tools/drracket_module-language-tools.html#% (list label bitmap callback number))) -(define (make-drracket-buttons command-char) - (let ([command-char-button (make-command-char-button command-char)]) +(define (make-drracket-buttons) + (let ([command-char-button (make-command-char-button)]) (list command-char-button))) diff --git a/quad/quad/lang/reader.rkt b/quad/quad/lang/reader.rkt index bde15450..17260d0d 100644 --- a/quad/quad/lang/reader.rkt +++ b/quad/quad/lang/reader.rkt @@ -9,9 +9,11 @@ quad/lang/quad (define (quad-read p) (syntax->datum (quad-read-syntax (object-name p) p))) +(define quad-command-char #\@) + (define (quad-read-syntax path-string p) (define quad-at-reader (make-at-reader - #:command-char #\◊ + #:command-char quad-command-char #:syntax? #t #:inside? #t)) (define source-stx (quad-at-reader path-string p)) @@ -24,9 +26,9 @@ quad/lang/quad (define my-make-scribble-inside-lexer (dynamic-require 'syntax-color/scribble-lexer 'make-scribble-inside-lexer (λ () #f))) (cond [my-make-scribble-inside-lexer - (my-make-scribble-inside-lexer #:command-char #\◊)] + (my-make-scribble-inside-lexer #:command-char quad-command-char)] [else default])] [(drracket:toolbar-buttons) (define my-make-drracket-buttons (dynamic-require 'quad/lang/buttons 'make-drracket-buttons)) - (my-make-drracket-buttons #\◊)] + (my-make-drracket-buttons)] [else default])) \ No newline at end of file