|
|
@ -1,6 +1,6 @@
|
|
|
|
#lang racket/base
|
|
|
|
#lang racket/base
|
|
|
|
(require racket/syntax syntax/strip-context)
|
|
|
|
(require racket/syntax syntax/strip-context racket/class)
|
|
|
|
(require (only-in scribble/reader make-at-reader) pollen/world pollen/project racket/list)
|
|
|
|
(require (only-in scribble/reader make-at-reader) pollen/file pollen/world pollen/project racket/list)
|
|
|
|
(provide define+provide-reader-in-mode (all-from-out pollen/world))
|
|
|
|
(provide define+provide-reader-in-mode (all-from-out pollen/world))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -58,7 +58,6 @@
|
|
|
|
'module-language
|
|
|
|
'module-language
|
|
|
|
`#(pollen/language-info get-language-info ,reader-here-path)))) ; reader-here-path acts as "top" runtime config
|
|
|
|
`#(pollen/language-info get-language-info ,reader-here-path)))) ; reader-here-path acts as "top" runtime config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-syntax-rule (define+provide-reader-in-mode mode)
|
|
|
|
(define-syntax-rule (define+provide-reader-in-mode mode)
|
|
|
|
(begin
|
|
|
|
(begin
|
|
|
|
(define reader-mode mode)
|
|
|
|
(define reader-mode mode)
|
|
|
@ -68,10 +67,17 @@
|
|
|
|
(λ (key default)
|
|
|
|
(λ (key default)
|
|
|
|
(case key
|
|
|
|
(case key
|
|
|
|
[(color-lexer)
|
|
|
|
[(color-lexer)
|
|
|
|
(define make-scribble-inside-lexer2
|
|
|
|
(define my-make-scribble-inside-lexer
|
|
|
|
(dynamic-require 'syntax-color/scribble-lexer 'make-scribble-inside-lexer (λ () #f)))
|
|
|
|
(dynamic-require 'syntax-color/scribble-lexer 'make-scribble-inside-lexer (λ () #f)))
|
|
|
|
(cond [make-scribble-inside-lexer2
|
|
|
|
(cond [my-make-scribble-inside-lexer
|
|
|
|
(make-scribble-inside-lexer2 #:command-char #\◊)]
|
|
|
|
(define definitions-frame (object-name in))
|
|
|
|
|
|
|
|
(define maybe-source-path (with-handlers ([exn:fail? (λ(exn) #f)])
|
|
|
|
|
|
|
|
(send definitions-frame get-filename))) ; will be #f if unsaved file
|
|
|
|
|
|
|
|
(define my-command-char (if maybe-source-path
|
|
|
|
|
|
|
|
(parameterize ([current-directory (dirname maybe-source-path)])
|
|
|
|
|
|
|
|
(world:current-command-char))
|
|
|
|
|
|
|
|
world:command-char))
|
|
|
|
|
|
|
|
(my-make-scribble-inside-lexer #:command-char my-command-char)]
|
|
|
|
[else default])]
|
|
|
|
[else default])]
|
|
|
|
[else default])))
|
|
|
|
[else default])))
|
|
|
|
(provide (rename-out [custom-read read] [custom-read-syntax read-syntax]) get-info)))
|
|
|
|
(provide (rename-out [custom-read read] [custom-read-syntax read-syntax]) get-info)))
|