reference-manual work
svn: r6495 original commit: 8d61bb4c70c24156e4bc6d98d023ccd40fb49a19
This commit is contained in:
parent
ef13a0dbcc
commit
c049ea87f0
|
@ -34,9 +34,9 @@
|
||||||
[(_ lang rest ...)
|
[(_ lang rest ...)
|
||||||
(with-syntax ([modtag (datum->syntax-object
|
(with-syntax ([modtag (datum->syntax-object
|
||||||
#'here
|
#'here
|
||||||
'(unsyntax (schemefont "#module "))
|
`(unsyntax (schemefont ,(format "#module ~a" (syntax-e #'lang))))
|
||||||
#'lang)])
|
#'lang)])
|
||||||
#'(schemeblock modtag lang rest ...))]))
|
#'(schemeblock modtag rest ...))]))
|
||||||
|
|
||||||
(define (to-element/result s)
|
(define (to-element/result s)
|
||||||
(make-element "schemeresult" (list (to-element/no-color s))))
|
(make-element "schemeresult" (list (to-element/no-color s))))
|
||||||
|
@ -137,8 +137,17 @@
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
|
(provide margin-note)
|
||||||
|
|
||||||
|
(define (margin-note . c)
|
||||||
|
(make-styled-paragraph (list (make-element "refcontent"
|
||||||
|
c))
|
||||||
|
"refpara"))
|
||||||
|
|
||||||
|
;; ----------------------------------------
|
||||||
|
|
||||||
(provide defproc defproc* defstruct defthing defform defform* defform/none
|
(provide defproc defproc* defstruct defthing defform defform* defform/none
|
||||||
specsubform specsubform/inline
|
specform specsubform specsubform/inline
|
||||||
var svar void-const undefined-const)
|
var svar void-const undefined-const)
|
||||||
|
|
||||||
(define void-const
|
(define void-const
|
||||||
|
@ -190,11 +199,15 @@
|
||||||
(define-syntax specsubform
|
(define-syntax specsubform
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ spec desc ...)
|
[(_ spec desc ...)
|
||||||
(*specsubform 'spec (lambda () (schemeblock0 spec)) (lambda () (list desc ...)))]))
|
(*specsubform 'spec #f (lambda () (schemeblock0 spec)) (lambda () (list desc ...)))]))
|
||||||
|
(define-syntax specform
|
||||||
|
(syntax-rules ()
|
||||||
|
[(_ spec desc ...)
|
||||||
|
(*specsubform 'spec #t (lambda () (schemeblock0 spec)) (lambda () (list desc ...)))]))
|
||||||
(define-syntax specsubform/inline
|
(define-syntax specsubform/inline
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ spec desc ...)
|
[(_ spec desc ...)
|
||||||
(*specsubform 'spec #f (lambda () (list desc ...)))]))
|
(*specsubform 'spec #f #f (lambda () (list desc ...)))]))
|
||||||
(define-syntax defthing
|
(define-syntax defthing
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ id result desc ...)
|
[(_ id result desc ...)
|
||||||
|
@ -429,9 +442,9 @@
|
||||||
forms form-procs))
|
forms form-procs))
|
||||||
(content-thunk)))))
|
(content-thunk)))))
|
||||||
|
|
||||||
(define (*specsubform form form-thunk content-thunk)
|
(define (*specsubform form has-kw? form-thunk content-thunk)
|
||||||
(parameterize ([current-variable-list
|
(parameterize ([current-variable-list
|
||||||
(append (let loop ([form form])
|
(append (let loop ([form (if has-kw? (cdr form) form)])
|
||||||
(cond
|
(cond
|
||||||
[(symbol? form) (if (meta-symbol? form)
|
[(symbol? form) (if (meta-symbol? form)
|
||||||
null
|
null
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
(module scheme mzscheme
|
(module scheme mzscheme
|
||||||
(require "struct.ss"
|
(require "struct.ss"
|
||||||
"basic.ss"
|
"basic.ss"
|
||||||
(lib "class.ss"))
|
(lib "class.ss")
|
||||||
|
(lib "for.ss"))
|
||||||
|
|
||||||
(provide define-code
|
(provide define-code
|
||||||
to-element
|
to-element
|
||||||
|
@ -92,7 +93,8 @@
|
||||||
[l (syntax-line c)])
|
[l (syntax-line c)])
|
||||||
(let ([new-line? (and l (l . > . line))])
|
(let ([new-line? (and l (l . > . line))])
|
||||||
(when new-line?
|
(when new-line?
|
||||||
(out "\n" no-color)
|
(for ([i (in-range (- l line))])
|
||||||
|
(out "\n" no-color))
|
||||||
(set! line l)
|
(set! line l)
|
||||||
(set! col-map next-col-map)
|
(set! col-map next-col-map)
|
||||||
(set! next-col-map (make-hash-table 'equal))
|
(set! next-col-map (make-hash-table 'equal))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user